By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,694 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,694 IT Pros & Developers. It's quick & easy.

Command Line Parameters - Launched from a form

P: 84
I have created several forms that will launch various programs. One of the programs is Putty. see command line below

"c:\program files\putty\putty.exe"

Is there a way to pass in a command that will open the window maximized?
Currently the window opens in normal mode.

If that is not possible, can I call via a command line a desktop shortcut? I have several putty shortcuts that open in maximized screen mode.
Apr 11 '07 #1
Share this Question
Share on Google+
5 Replies


pks00
Expert 100+
P: 280
What code are u using to open putty?
U could use Shell and tell it to open maximised

eg

Shell "c:\program files\putty\putty.exe", vbMaximizedFocus

there is also ShellExecute, requires use of an API but the above is easier
Apr 11 '07 #2

P: 84
What code are u using to open putty?
U could use Shell and tell it to open maximised

eg

Shell "c:\program files\putty\putty.exe", vbMaximizedFocus

there is also ShellExecute, requires use of an API but the above is easier

here is the statement I am running

Private Sub Command281_Click()
On Error GoTo Err_Command281_Click

Dim stAppName As String

stAppName = "C:\Program Files\Putty\putty.exe "
Call Shell(stAppName, 1)

Exit_Command281_Click:
Exit Sub

Err_Command281_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command281_Click

End Sub

Where would the maximize command go?
Apr 11 '07 #3

pks00
Expert 100+
P: 280
second parameter in Shell like in the example Ive given
u are passing in 1
u need to pass in vbMaximizedFocus (which has a value of 3)
Apr 11 '07 #4

P: 84
second parameter in Shell like in the example Ive given
u are passing in 1
u need to pass in vbMaximizedFocus (which has a value of 3)
great. That worked. thx
Apr 11 '07 #5

pks00
Expert 100+
P: 280
Cool :)

the intellisense menu should bring up a list anyway
Apr 11 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.