[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Select a monitor with my Application

Posted on 2013-02-05
6
Medium Priority
?
306 Views
Last Modified: 2013-02-07
Hello Experts,
I have a desktop with two monitors and I need my app to open its windows on a pre selected monitor. HOw can I do this ?
Regards,
0
Comment
Question by:rguillermo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Nicolus
ID: 38858038
Open the App's window... Move it to the monitor you want to use... close the app on that monitor and Windows remembers that opening.
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 38859038
As Nicolus says. This is a job for Windows and/or the device driver to remember.

If you want to override this, look out for _VFP.Left and _VFP.Top. In a two monitor setup with a left and right monitor you will have _VFP.Left at about 0, if it's in the left screen and about half the desktop screen resolution, for the right screen. I'd not recommend that, though. Any application can be maximised on any screen and next time you start it it will be the same. I remember this was a bit problematic in XP without a proper device driver configured to remember windows positions and states, but I think since Vista and at least Win7 I've never seen this fail.

Bye, Olaf.
0
 
LVL 4

Expert Comment

by:Nicolus
ID: 38861538
Olaf,

Thank you for adding an important factor which I missed in my original posting...


Open the App's window... Move it to the monitor you want to use...  MAXIMIZE THE WINDOW, then close the app on that monitor and Windows will remember which monitor to open the app in.

But you have to maximize it after it has been moved to the desired monitor before closing it.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:rguillermo
ID: 38865511
And if I want to have a button to choose where to open the next window?
Can I select in which screen the the next window will open from my own app ?
Thanks
0
 
LVL 30

Accepted Solution

by:
Olaf Doschke earned 2000 total points
ID: 38865608
Internal in fox applications the Foxuser.DBF will store windows positions. So unless you suppress foxuser.dbf creation and don't set forms left/top or autocenter, that's automatic, too. In the firs place a form will show at the Left/Top position you set in the form designer.

The help topic "resource files in applications says this about the foxuser.dbf:
Visual FoxPro resource files store useful information for your application, including window positions, Browse window configurations, and label definitions. If your application relies on specific settings for any of these resource items, you must also distribute the FoxUser database and memo files or the resource files you create specifically for your application. These resource files consist of a Visual FoxPro table with an associated memo file, usually named FoxUser.dbf and FoxUser.fpt.
If that doesn't work for you, set Left and Top at Init and store it somewhere in destroy or in release. You have a database language, just use it to store these two ints somewhere. You're free to do anything you want, and if you want to store windows positions, feel free to do so.

Bye, Olaf.
0
 

Author Closing Comment

by:rguillermo
ID: 38865773
Thank you very much !!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question