Alright so currently I am coding a login verification program for my forum in Visual Studio 2012 Ultimate Edition. So far I have made 2 forms, one that is the login page where I want the user to be able to login to the forum using 2 text boxes, and a button. So I figured that part out and this is my code for the "Login" button.
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click WebBrowser1.Document.GetElementById("ips_username").SetAttribute("Value", TextBox1.Text) WebBrowser1.Document.GetElementById("ips_password").SetAttribute("Value", TextBox2.Text) WebBrowser1.Document.GetElementById("submit").InvokeMember("click") End If End Sub
So basically the web browser automatically directs to my forum, and once I type in the things in the forms text boxes, it fills out, and it says in the little web browser window that it was a successful login.
Now this is the part that I'm stuck on.
Can someone provide me with the code that will make the second form appear once the login was successful, and give you a basic message box if it failed. I tried using some if and then statements but it didn't work. I kinda even predicted them because I was
never an experienced Visual Studio programmer but I hope you guys can help.