Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Switching monitors

Hello,

I'm currently working on an application that, as part of its function,
launches various executable files (using the Shell function). The
client has a dual monitor arrangement, and wants to be able to
control, programmatically, which monitor will be used at launch
time.

I’ve done a lot of searching on the Internet, but so far, nothing
quite addresses this issue. I’m thinking that it should be possible
somehow, (possibly an API), seeing as Windows has the capability to
remember the previously used monitor.

I’m hoping someone can help me out, either by pointing me in the right
direction, or, telling me it’s just not possible. Thanks in advance
for your help.

Regards,

Dave U
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Switching monitors

Hi Dave -

You certainly can move & size windows of launched applications and you're
right it would be via the Windows API. I've not done it in a long time
though and it wasn't with multiple displays. To my knowledge the API doesn't
discern between physical screens, it just uses an absolute position based on
0,0 being the top left of screen #1.

Probably the best bet is ask in the group
microsoft.public.win32.programmer.gdi (
http://www.microsoft.com/communities...ogrammer. gdi
) they'll probably be able to give you the API calls without having to look
them up - you'll need the code to identify the window handle (hwnd) of the
window you're looking for and then use that to move it around and resize it.
If you get stuck implementing those in vba then someone here will be able to
help you with that.

Also, I've seen bugs where the target app has not finished launching before
you try to manipulate it in vba (or fails to launch completely) resulting in
unpredictable behaviour. So remember to leave a good opportunity for the app
to start, make sure you've got excellent error handling and push the thread
priority of excel down temporarily to give the other app some cpu time.

~ James


"Dave Unger" wrote:

Hello,

I'm currently working on an application that, as part of its function,
launches various executable files (using the Shell function). The
client has a dual monitor arrangement, and wants to be able to
control, programmatically, which monitor will be used at launch
time.

Ive done a lot of searching on the Internet, but so far, nothing
quite addresses this issue. Im thinking that it should be possible
somehow, (possibly an API), seeing as Windows has the capability to
remember the previously used monitor.

Im hoping someone can help me out, either by pointing me in the right
direction, or, telling me its just not possible. Thanks in advance
for your help.

Regards,

Dave U

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Switching monitors

Hi Dave

Maybe the creator of this great program can help you
http://www.realtimesoft.com/ultramon/

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dave Unger" wrote in message ...
Hello,

I'm currently working on an application that, as part of its function,
launches various executable files (using the Shell function). The
client has a dual monitor arrangement, and wants to be able to
control, programmatically, which monitor will be used at launch
time.

I’ve done a lot of searching on the Internet, but so far, nothing
quite addresses this issue. I’m thinking that it should be possible
somehow, (possibly an API), seeing as Windows has the capability to
remember the previously used monitor.

I’m hoping someone can help me out, either by pointing me in the right
direction, or, telling me it’s just not possible. Thanks in advance
for your help.

Regards,

Dave U

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Switching monitors

Hi James & Ron,

Many thanks to both of you - both of your suggestions pointed me to
exactly what I was looking for, very helpful.

Thanks again,

regards,

Dave U


On Apr 22, 7:39*am, "Ron de Bruin" wrote:
Hi Dave

Maybe the creator of this great program can help youhttp://www.realtimesoft.com/ultramon/

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Dave Unger" wrote in ...

Hello,

I'm currently working on an application that, as part of its function,
launches various executable files (using the Shell function). *The
client has a dual monitor arrangement, and wants to be able to
control, programmatically, which monitor will be used at launch
time.

I’ve done a lot of searching on the Internet, but so far, nothing
quite addresses this issue. *I’m thinking that it should be possible
somehow, (possibly an API), seeing as Windows has the capability to
remember the previously used monitor.

I’m hoping someone can help me out, either by pointing me in the right
direction, or, telling me it’s just not possible. *Thanks in advance
for your help.

Regards,

Dave U


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel & Two Monitors Teddy[_2_] Excel Programming 3 April 2nd 07 05:16 PM
2 monitors StuBela Setting up and Configuration of Excel 5 March 9th 07 10:17 AM
Using Two Monitors Al Excel Programming 0 November 14th 05 02:35 PM
Linking with Two Monitors Craig Links and Linking in Excel 6 September 12th 05 11:09 PM
Dual monitors adwilson Excel Discussion (Misc queries) 2 March 25th 05 06:15 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"