How do I combine 2 programs

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.

Comments

  • I don't know much about visual basic but I know in standard basic you make it a subprogram try looking that up in your books. In a standard basic compiler you would makesure that the subs and strings didn't mess with the other subs and strings then past it at the end of the program and do a goto command for the subprogram
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion