473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Command Line Parameters - Launched from a form

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
5 5978
pks00
280 Expert 100+
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
sesling
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
280 Expert 100+
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
sesling
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
280 Expert 100+
Cool :)

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

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

Similar topics

2
by: Sharon P | last post by:
how do I set command line parameters in the .Net IDE so I can debug my App ? thank you , Sharon
2
by: Erik Wikström | last post by:
This is probably a stupid question but is there any easy way to get the command line parameters in a windows form? As it is now I copy the parameters into a statis string array belonging to the...
3
by: Mark | last post by:
How can I use (get) command line parameters in my application?
1
by: Rajiv Das | last post by:
Hi, This is the first time I am using managed cpp. However, I am unable to find how to get the command line parameters to the main function in both the console and the Application version. The IDE...
5
by: Tarun Mitra | last post by:
I have not been able pass the parameter with a space in an hyperlink on a ..aspx page something like <asp:HyperLink NavigateUrl="http://localhost/syskiosk/test.exe John" id="hlEditDetails"...
1
by: yxq | last post by:
I want to install *.msi using Msiexec Command Line Parameters, but how to specify the target directory? http://helpnet.installshield.com/robo/projects/helplibdevstudio9/IHelpCmdLineMSI.htm Thank...
3
by: Rob | last post by:
I have an app that calls an eternal EXE using process.start. My issue is I have a couple command line parameters that need to be put in, so that it would read: Process p = new Process();...
2
by: william.w.oneill | last post by:
I have an application that takes a few command line parameters. As recommended by others in this group, I'm using a named mutex to ensure that only one instance of the application is running. My...
1
by: 85ssp | last post by:
I am working on debugging a multithreaded network application. I have two forms. One of which is my testing form, the other is the actual user form. I need to be able to load only my testing form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.