[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1179
  • Last Modified:

ms access database container dual monitor setup

I have a ms access application on a dual monitor setup,the user has the option of  selecting which monitor the forms will be displayed on this is done by the use of a command button,I am looking for a way to switch the database container using vba to the selected monitor or any alternative method? thanks
0
Svgmassive
Asked:
Svgmassive
  • 3
  • 2
  • 2
1 Solution
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Curious, What version of Access and Windows?

I have a lot of user with two or more monitors.  I attempted something similar once.

Since all the multiple monitor system are running Windows 7 I train the user to use the Windows 7 Snap feature. By using the Windows Key and the arrow keys together they can easily move applications around between monitors.  In the long run the users can now get a lot more out of their dual monitors when when not using my Access application. They are a more empowered user. This allowed each users to move windows around on the monitors at will to best fit their current needs.

Boyd Trimmell, Microsoft Access MVP
0
 
SvgmassiveAuthor Commented:
access 2010 windows 7 64bit. Thanks hitech.I would like to once the users click the command button to switch monitors the container will also switch to the selected monitor
0
 
Nick67Commented:
It can be done, but it REALLY won't be simple, especially if not all monitor setups are the same, or if you have really huge monitors.  Positioning is done by twips from the upper left corner being (0,0) to the lower right hand corner being some number dependent on the monitor sizes and numbers involved.

The gotcha is that the values you can use have an upper bound of 32K.  Three 24" 1080p monitors are large enough that they breach that boundary.  And that's all relative to the main Access window, so it gets less applicable once you leave Access 2003 and get stuck with tabs.

To move the main Access window is probably going to take Windows API code.  You'd need to find the handle of the Access app, and then move the window to a desired location.  The beginnings of wisdom are here
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx
and better here:
http://support.microsoft.com/kb/210085

The code in the KB article will go nicely in an Access module--but working out all the X and Y values that will correspond to where you want the window to go on all the computers with all the varying monitors setups...

Well, that won't be fun.
It's almost like that old saw about teaching a man to fish.  In this case, teach some end users to position their own windows, and they'll be able to do it for themselves and others forever.  Try to code it up for them, and you've given yourself a long lasting headache.

And lets not talk about what pop-up and modal windows do :(
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Diito what Nick67 said.

I would like to once the users click the command button to switch monitors the container will also switch to the selected monitor

I also thought that sounded like a great idea. A few gray hairs later and users think I am an idiot because I cant get it to work correctly all the time. It was starting to frustrate a lot of users since it was messing up how they like to layout their forms/apps.  It sounded like a good idea to me. Once I started watching how the users work and testing with all the different hardware and video configurations  I quickly realized that teaching them Windows 7 Snap was much more powerful that anything  I code code.  I did waste  many hours on this trying to get it to handle everything the users wanted. After teaching then Windows & Snap everybody is happier and more productive.  Making the users more productive was the original reason I started this journey.

Curious, is the something 60% or more of your users ask for or is this just to see if you can?
0
 
SvgmassiveAuthor Commented:
excellent
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Svgmassive,

Would you mind updating us on how it goes?

Good luck with your project.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now