Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

4 Monitors and a popup form

Status
Not open for further replies.

Blorf

Programmer
Dec 30, 2003
1,608
US
Hello.

Is there any way in Access VBA Code to open a popup form, and tell the form to open in a specific monitor (each monitor is on a different video card if that helps)

Thank you,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That DonÆt.

 
Maybe?

I'd start with the fact that a form has a hwnd property. You may be able to find a windows api call to move the hwnd to another screen. If you have any luck, I'm sure we would all be interested to see it. Even if you find a solution in another language someone may be able to translate if you post here.
 
It turns out to be a bit simpler than I would have expected. Assuming you know which monitor Access it's self is open, you can move the form to positions relative to that monitor (And the actual Access position) by using a form move command. In this case, I have two monitors, and Access is open on the right hand. In Access code using the following opens the form on the right, then moves it to the left.

On the popup form's on open event, the form being named CCTrans

Forms("CCTrans").Move Left:=-29430, Top:=-2625
DoCmd.Maximize

This does the trick nicely.

Thank you for your input.



There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That DonÆt.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top