Jumat, 17 September 2010

Make Login Web in VB3

Login to a Website In VB6

You will need to add a Webbrowser (Make it as small as possible and make it named webbrowser1)
Next you will need to add a Command Button (Name it cmdlogin)
Next add 2 text boxes (For username and password, leave the names default)
Last add a lable (Name it lblstatus)
Add this to your form:



Code:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL = "http://www.thewebsite.com/SignIn(Or what ever the login page is).jsp" Then
WebBrowser1.Document.All("EmailUsername").Value = user.Text
WebBrowser1.Document.All("Password").Value = pass.Text
WebBrowser1.Document.All("SignIn").Click
End If




If lblStatus.Caption = "Login Sucessful" Then
KewlButtons1.Enabled = True

End If
End sub



Code:

Code:
If App.PrevInstance = True Then Call MsgBox("This program is already running!", vbExclamation)


End Sub



This will make it so only your program can be ran one at a time
well this only makes a message box come up that says its already running. use this code instead to make it go away after repoening,
Private Sub Form_Load()


Code:

Code:
If App.PrevInstance = True Then Call MsgBox("This program is already running!", vbExclamation)
Form1.hide
End Sub

Related Post :



0 comments:

R