|
-
May 30th, 2000, 07:40 AM
#1
Thread Starter
Member
I want to create a program that can be called with or without arguments just like ms-dos commands. (ex. chkdsk /f)
The arguments are actually login id and password. The program will check if arguments are supplied and then login accordingly. On the otherhand, if the user did not supply the arguments, the program will show a dialog box.
My only problem here is the passing and reading of arguments.
tnx.
using VB 6.0 Enterprise Edition SP3
-
May 30th, 2000, 10:43 AM
#2
PowerPoster
Assume the ValidatePwd is your function to check the input user id and password is match with those you have in the user database and the code just like below:
Code:
Public Sub Main()
Dim MyCmdLine As String
MyCmdLine = Command()
If Len(MyCmdLine) <> 0 Then
If ValidatePwd Then
Load frmMain
frmMain.Show
Else
MsgBox "Invalid user id or password."
End If
Else
MsgBox "Invalid command line."
Load frmMain
frmMain.Show
End If
End Sub
-
May 30th, 2000, 10:53 AM
#3
Conquistador
To make it not required all the time
Code:
If Command() = "" Then Goto NoCOm:

-
May 30th, 2000, 03:45 PM
#4
Thread Starter
Member
thank you very much guys! that's a great help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|