关闭

VB邮箱登陆

399人阅读 评论(0) 收藏 举报

今天首次开通我的BLOG,希望我能做得更好

Private Sub Command1_Click()
Dim id, psw, exe, url1, url2, url3 As String
id = Text1.Text
psw = Text2.Text
exe = "C:/Program Files/Internet Explorer/IEXPLORE.EXE"
url1 = "https://reg.163.com/logins.jsp?url=http%3A%2F%2Ffm163.163.com%2Fcoremail%2Ffcg%2Fntesdoor2%3Fverifycookie%3D1%26language%3D-1%26style%3D-1&type=1&product=mail163&username=" & id & "&password=" & psw & "&submit=%B5%C7%A1%A1%C2%BC"
url2 = "http://entry.126.com/cgi/login?domain=126.com&language=0&bCookie&user=" & id & "&pass=" & psw
url3 = "http://edit.bjs.yahoo.com/config/login?.intl=cn&.done=http%3A//cn.mail.yahoo.com/inset.html%3Frr%3D1474710818&.src=ym&.challenge=SNbMW0EYAxYzJZXzUqOUmMwS9Aqb&login=" & id & "&passwd=" & psw
If Combo1.Text = "163信箱" Then
Shell exe + Space(1) + url1, 1
End If
If Combo1.Text = "126信箱" Then
Shell exe + Space(1) + url2, 1
End If
If Combo1.Text = "Yahoo信箱" Then
Shell exe + Space(1) + url3, 1
End If
End Sub
Private Sub Form_Load()
Combo1.AddItem "163信箱"
Combo1.AddItem "126信箱"
Combo1.AddItem "Tom信箱"
Combo1.AddItem "Yahoo信箱"
Combo1.ListIndex = 0
End Sub

方法2

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As _
Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
Dim id, psw, url1, url2, url3, url4, url5 As String
id = Text1.Text
psw = Text2.Text
url1 = "http://reg4.163.com/in.jsp?url=http://fm163.163.com/coremail/fcg/ntesdoor2?language=-1&style=-1&username=" & id & "&password=" & psw
url2 = "http://entry.126.com/cgi/login?domain=126.com&language=0&bCookie&user=" & id & "&pass=" & psw
url3 = "http://login.mail.tom.com/cgi/login?user=" & id & "&pass=" & psw
url4 = "http://webmail.21cn.com/NULL/NULL/NULL/NULL/NULL/SignIn.gen?LoginName=" & id & "&passwd=" & psw
url5 = "http://edit.bjs.yahoo.com/config/login?.intl=cn&.done=http%3A//cn.mail.yahoo.com/inset.html%3Frr%3D1474710818&.src=ym&.challenge=SNbMW0EYAxYzJZXzUqOUmMwS9Aqb&login=" & id & "&passwd=" & psw
If Combo1.Text = "163.com网易" Then
ShellExecute Me.hwnd, "open", url1, "", "", 5
End If
If Combo1.Text = "126.com网易" Then
ShellExecute Me.hwnd, "open", url2, "", "", 5
End If
If Combo1.Text = "Tom.com信箱" Then
ShellExecute Me.hwnd, "open", url3, "", "", 5
End If
If Combo1.Text = "21cn.com" Then
ShellExecute Me.hwnd, "open", url4, "", "", 5
End If
If Combo1.Text = "Yahoo.com.cn" Then
ShellExecute Me.hwnd, "open", url5, "", "", 5
End IfEnd Sub
Private Sub Form_Load()
Combo1.AddItem "163.com网易"
Combo1.AddItem "126.com网易"
Combo1.AddItem "Tom.com信箱"
Combo1.AddItem "21cn.com"
Combo1.AddItem "Yahoo.com.cn"
Combo1.ListIndex = 0
End Sub

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:646次
    • 积分:13
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档
    阅读排行
    评论排行