VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Program with Command Line inputs

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)

Rate Program with Command Line inputs

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

Download this snippet    Add to My Saved Code

Program with Command Line inputs Comments

No comments have been posted about Program with Command Line inputs. Why not be the first to post a comment about Program with Command Line inputs.

Post your comment

Subject:
Message:
0/1000 characters