Custom Launch for exe's? Need help
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Custom Lanuch for exe's? Need help
What i mean by this is i want to start an exe using another exe or a shortcut with a command applied to it... Some of you may know what im talking about, i want to be able to go Shell("program.exe +command") many games use this to change the res or other features, eg Shell("game.exe +width 800 +hight 600")
So what i want to know is how i do this for my exe?
What i mean by this is i want to start an exe using another exe or a shortcut with a command applied to it... Some of you may know what im talking about, i want to be able to go Shell("program.exe +command") many games use this to change the res or other features, eg Shell("game.exe +width 800 +hight 600")
So what i want to know is how i do this for my exe?
You mean like a Launcher?
You can just make your form1 the Launcher and form2 and so on the Main form
it's easier that way
with form1 you just do
Form2.Show()
Form2.Width =
Form2.Height =
You can just make your form1 the Launcher and form2 and so on the Main form
it's easier that way
with form1 you just do
Form2.Show()
Form2.Width =
Form2.Height =
No, but kinda the idea. I have 2 programs... wait ill make a picture diagram :P
Ok this is what i mean
Ok this is what i mean
You do not have the required permissions to view the files attached to this post.
Hello Esky,
Will you know where the program is located on the computer?. If so then you can just use something like the process start command:
Will you know where the program is located on the computer?. If so then you can just use something like the process start command:
Code: Select all
Hope that helps.System.Diagnostics.Process.Start("C:\MyProgram.exe")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Ahh yes i understand up to that part im trying to learn how to launch an exe with a command eg
System.Diagnostics.Process.Start("C:\MyProgram.exe") - Start program normaly
or
System.Diagnostics.Process.Start("C:\MyProgram.exe +command1") - Start program with a var/command
So im trying to find the Form/App startup code to do this from within the "MyProgram.exe"
Im assuming somthing around the lines of
System.Diagnostics.Process.Start("C:\MyProgram.exe") - Start program normaly
or
System.Diagnostics.Process.Start("C:\MyProgram.exe +command1") - Start program with a var/command
So im trying to find the Form/App startup code to do this from within the "MyProgram.exe"
Im assuming somthing around the lines of
Code: Select all
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Application.StartupPath = Application.StartupPath & " +command1" Then
'DO SOMTHING
Else
'START NORMALY
End If
End Sub
Hello,
You should be able to grab the command arguments used by using:
You could use it like you wanted like:
You should be able to grab the command arguments used by using:
Code: Select all
For example if I started the program with MyProgram.exe somecommandtext then used this code in its "Form_Load" event:Command()
Code: Select all
Then it would show a message box with the text "somecommandtext" inside it.Msgbox(Command())
You could use it like you wanted like:
Code: Select all
Is that what you mean? :?If Command() = "somecommandtext" then
'DO THIS
Else
'DO THIS INSTEAD
End If
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
What do you mean by "Command1" ?
so some online games have a Settings Tab where you can change settings like resolutions, window mode, etc
so Im guessing thats what you want your program to do?
Program A = Launcher
Program B = Main Program
In program A you go into settings and you made the size 500x500
you save the setting and click launch, then program B starts up and the size is 500x500
if this is what you want then just simply write the settings into a registry or a file, then let program B retrieve the settings
Code: Select all
Let me use this example and see if it's like what you want :If Application.StartupPath = Application.StartupPath & " +command1" Then
so some online games have a Settings Tab where you can change settings like resolutions, window mode, etc
so Im guessing thats what you want your program to do?
Program A = Launcher
Program B = Main Program
In program A you go into settings and you made the size 500x500
you save the setting and click launch, then program B starts up and the size is 500x500
if this is what you want then just simply write the settings into a registry or a file, then let program B retrieve the settings
Hello,
This code works when starting a program with commands from vb:
This code works when starting a program with commands from vb:
Code: Select all
Happy coding! cooll;Dim App As New Process
App.StartInfo.FileName = "C:\MyProgram.exe"
App.StartInfo.Arguments = "command1"
App.Start()
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
If you want a shortcut, you can make a shortcut of the exe, then go to Properties, Target textbox and add the command to it.
Inside your VB program you can use what CodenStuff said,
Command()
Using an If statement you can change the way your program responds.
Inside your VB program you can use what CodenStuff said,
Command()
Using an If statement you can change the way your program responds.
OW MY GOD. I LOVE YOU ALL! ive been trying to find this method for about a year... ive been doing work-around using the registry and external files... and now! OMG I LOVE YOU ALL!
i know i must sound a little over excited right now but when you've been stuck on 1 problem for about a year and then a nice group of people show you the way you tend to be a lil happy!
i know i must sound a little over excited right now but when you've been stuck on 1 problem for about a year and then a nice group of people show you the way you tend to be a lil happy!
Copyright Information
Copyright © Codenstuff.com 2020 - 2023