如何用VB编一个连接到网站上的按钮啊

来源:百度知道 编辑:UC知道 时间:2024/05/29 19:30:46
请把代码告诉我

谁边问下,怎么可以加个有事Q我的按钮啊

只要一按就可以打开QQ对话框

在代码窗口最顶端加入以下代码:

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

加入按钮 Command1 , 加入以下代码:
Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", "http://wpa.qq.com/msgrd?V=1&Uin=283518327&Site=www.126.com&Menu=yes", "", "", 5
End Sub

点击之即可和我联系. 将代码中 Uin=283518327 一句改成 Uni=您的QQ号 即可达到您想要的效果!