Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Hide()
WebBrowser2.Hide()
End Sub
Private Sub WebBrowser1_DocumentCompleted(sender As System.Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
TextBox1.Enabled = True
TextBox2.Enabled = True
Button1.Enabled = True
TextBox1.Focus()
Label3.Text = "Connected, please log in to VNote server"
If WebBrowser1.DocumentText.Contains("log out") Then
Label3.Text = "Logged in to VNote server."
TextBox1.Enabled = False
TextBox2.Enabled = False
Button1.Enabled = False
End If
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
If WebBrowser1.DocumentText.Contains("fo_member_login") Then
WebBrowser1.Document.GetElementById("uid").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("upw").SetAttribute("value", TextBox2.Text)
WebBrowser1.Document.Forms(0).InvokeMember("submit")
TextBox1.Hide()
TextBox2.Hide()
Button1.Hide()
Label1.Hide()
Label2.Hide()
Label3.Hide()
WebBrowser2.Show()
Me.WindowState = FormWindowState.Maximized
WebBrowser2.Navigate("http://www.vnote.kr")