Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
| Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 13th, 2007, 04:15 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

  #2 (permalink)  
Old March 15th, 2007, 03:16 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can anyone help me with this?
thanks,
david

  #3 (permalink)  
Old March 16th, 2007, 06:57 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

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
================================================== =========
  #4 (permalink)  
Old March 16th, 2007, 01:55 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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.
  #5 (permalink)  
Old March 16th, 2007, 02:00 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

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
================================================== =========


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a shell command in sharepoint. Final_Boss SharePoint Development 0 August 17th, 2007 12:24 PM
Why do i get erro when alter table command in ms s keyvanjan SQL Server 2000 2 June 30th, 2007 02:06 AM
"ALTER USER.." command problem Dmitriy Oracle ASP 0 October 23rd, 2006 12:24 PM
Help on 'Alter Table' command charuni Classic ASP Basics 0 April 14th, 2006 11:14 AM
Shell command refusing to work underscore10304 Access VBA 4 October 20th, 2004 02:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.