Quantcast
Channel: Qbasic - Programmers Heaven
Viewing all articles
Browse latest Browse all 44

How do I combine 2 programs

$
0
0
Please forgive my ignorance, I suspect my question has a very simple answer, but I can't find it in the books I have. I started teaching myself using VB2008 express about 3 days ago.
I have a cool web browser and a small simple password prog. I want to activate the browser when the correct username and password is given.
This is the code for the password prog.


Public Class Form1

Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
If usernameBox.Text = "apress" And _
passwordBox.Text = "noidea" Then

If UsernameBox.Text = "123" And _
PasswordBox.Text = "456" Then

MessageBox.Show("Welcome! You're logged in")
Else
MessageBox.Show("Sorry, try again")
End If

Else
MessageBox.Show("Sorry, try again")
End If

End Sub
End Class

I don't know the syntax or the correct command to do what I want. Please help.

Viewing all articles
Browse latest Browse all 44

Trending Articles