IVY DOM


 

人生就像一副复杂拼图
每个人总有属於自己的记忆碎片
优质美国空间-老薛主机|IVY DOM|Flowline|

联系我

RSS




六月 23, 2012

[闲的]VB.NET 填表

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("www.22dm.com")
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Then
MessageBox.Show("Error:(1)" + Chr(13) + "your user or password can't be  left out!", "login in 22dm-return error infors")
ElseIf TextBox1.Text <> "" Or TextBox2.Text <> "" Then
WebBrowser1.Document.GetElementById("txtUser").Id = Replace(TextBox1.Text, " ", "")
WebBrowser1.Document.GetElementById("txtPassword").Id = TextBox2.Text
WebBrowser1.Document.GetElementById("btnLogin").RaiseEvent("click")
Dim wethernavigate As Boolean
'If WebBrowser1.Navigate("http://hi.22dm.com/bbs/") = True Then
'End If
If wethernavigate = True Then
MessageBox.Show("logined success!", "login in 22dm-return error infors")
Me.Show()
ElseIf wethernavigate = False Then
MessageBox.Show("logined failed!please check your password or user!", "login in 22dm-return error infors")
End If
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class

相关文章

返回
  1. 暂无评论。

  1. 暂无 Trackback

You must be logged in to post a comment.