vb.net代码转换为c#代码

spacher 2009-12-23 12:15:12
logintxtn = ComboBox1.SelectedItem
Dim m As Integer
For i = 0 To RichTextBox1.Lines.Length - 1
sline = RichTextBox1.Lines(i)
SpiltStr = " "
For n = 1 To Len(sline)
m = InStrRev(sline, SpiltStr, -1)
Next n
logintxt = Mid(sline, 1, m - 1)
codetxt = Mid(sline, m + 1, 100)
If logintxt = logintxtn Then
AUrl = Getini("GlobalSetting", "AddressUrl", "", Application.StartupPath & "\Config.ini")

'Try
WebBrowser1.Navigate(AUrl & "/login/logout.php")
Delay(1)
My.Computer.Audio.Stop()
ScrHeight = My.Computer.Screen.WorkingArea.Height
ScrWidth = My.Computer.Screen.WorkingArea.Width
Me.Location = New Point(ScrWidth / 2 - (1018 / 2), 0)
WebBrowser1.Height = ScrHeight - 294
WebBrowser2.Height = ScrHeight - 294
WebBrowser1.Location = New Point(-1, 266)
WebBrowser2.Location = New Point(1030, 266)

WebBrowser1.Navigate(AUrl)
Delay(2)
WebBrowser1.Document.All("email").SetAttribute("value", logintxt)
WebBrowser1.Document.All("password").SetAttribute("value", codetxt)
WebBrowser1.Document.Forms(0).InvokeMember("submit")
Delay(2)
For g = 1 To 10000
Delay(1)
tittxt = WebBrowser1.DocumentTitle
If tittxt = "我的首页 - 开心网" Then
Delay(1)
WebBrowser2.Navigate(AUrl & "/!rich/index.php") '买-首页
Delay(2)
WebBrowser1.Location = New Point(1030, 266)
WebBrowser2.Location = New Point(-1, 266)
Call huoqu()
Exit For
End If
Next
End If
Next
Timer1.Enabled = True
Timer1.Interval = SRefurbish * 1000
End Sub
...全文
35 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
平生我自如 2009-12-23
  • 打赏
  • 举报
回复
网上应该有转换工具! 你可以去搜搜

110,567

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧