README.md

December 5, 2022 ยท View on GitHub

Program with Command Line inputs

Description

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.

More Info

You have to put this code in a module. Set the startup for your app to Sub Main(). Add a label to form1 (Label1)

Submitted On
ByArmen Shimoon
LevelBeginner
User Rating5.0 (10 globes from 2 users)
CompatibilityVB 6.0
CategoryFiles/ File Controls/ Input/ Output
WorldVisual Basic
Archive File

Source Code

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