by Armen Shimoon (20 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)
Make your application run from command lines or the run dialog with arguements. ie: myapp.exe -m
No need to vote for this code because it is really basic.
Inputs
You have to put this code in a module. Set the startup for your app to Sub Main(). Add a label to form1 (Label1)
Sub Main()
If Command = "" Then
Form1.Label1.Caption = "No arguement."
Form1.Show
ElseIf Command = "-m" Then
Form1.Show
Form1.WindowState = 1
Form1.Label1.Caption = "Arguement: " & Command
Else
Form1.Label1.Caption = "Arguement: " & Command
Form1.Show
End If
End Sub