p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning VB 6 (http://p2p.wrox.com/forumdisplay.php?f=75)
-   -   how to alter shell command to direct where window (http://p2p.wrox.com/showthread.php?t=55337)

dgr7 March 13th, 2007 04:15 PM

how to alter shell command to direct where window
 
hello,
I have the following two lines of code in VB6

CabRunmailAppId = Shell("D:\PROGRAM FILES\TELSTAR\TelStar.exe", 1)
CabFilecleanAppId = Shell("D:\PROGRAM FILES\TELSTAR\TelStar.exe", 1)

that I execute to open two Telnet session windows. Right now the windows open one on top of another, and at first glance it looks like there's only one window running. Can the Shell statment be altered to tell the window where to open on the Desktop, so for example, the first Shell line could open the window in the top right of the desktop and the second Shell line open the second window in the bottom left of the desktop?

thanks in advance,
david


dgr7 March 15th, 2007 03:16 PM

can anyone help me with this?
thanks,
david


gbianchi March 16th, 2007 06:57 AM

hi there...

as far as i know, the shell command only launch a program. the only thing you can control if it's run maximixed, minimized or hided, but the position of it it control by the program itself or windows...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========

BrianWren March 16th, 2007 01:55 PM

Shell returns the process ID of the window that opens, (I believe). You can use that ID with APIs to move either of the windows.

gbianchi March 16th, 2007 02:00 PM

mm.. it's return the task id.. but using a lot of apis you can find the open window of that app. and try to move it....

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========


All times are GMT -4. The time now is 06:04 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.