How do I find which screen my app is running in?

S

Siv

Hi,
When my app starts it always starts up in the primary display of a
multi-display setup. If the user decides to always put my app in screen 2, is
there a way in VB that allows you to identify the screen you are running in?

I would then check the screen I am running in as the user closes the app and
store it in a registry setting. Then when the user re-opens the app make sure
it comes up in the same screen (probably needs a test to ensure the user
hasn't disconnected a screen since you last opened)?

I have had a look at the "My" command and can find read only properties that
relate to the screen but can't see a method that allows me to set the screen
in which to open up the app??

Any help appreciated,

Siv
 
S

Siv

Kevin,
Thanks for the advice. It didn't work at first and I figured out that it was
because I had the form's windowstate set to maximise, when I made that
"normal" and put a maximise command into the form_load after applying the
window position settings it works.

Thanks again, I was going at it from the wrong angle trying to set the
application's screen property (that doesn't seem to exist, as a settable
property at least) and had forgotten that although there are multiple
screens to Windows they are seen as one wide display.

Siv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top