Qbasic

Moderators: None (Apply to moderate this forum)
Number of threads: 81
Number of posts: 235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How do I combine 2 programs Posted by BadDog5150 on 12 Sept 2008 at 10:14 AM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.