源代码:
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 Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Dim a As String
Private Sub Command1_Click()
a = InputBox("输入QQ号码", "提醒")
Label3.Caption = a
If a = "" Then
MsgBox "QQ号码不能为空", vbYes, "错误"
Exit Sub
End If
Command2.Enabled = True
Command2.SetFocus
End Sub
Private Sub Command3_Click()
Label3.Caption = ""
Command2.Enabled = False
End Sub
Private Sub Form_Load()
MsgBox "欢迎进入查看QQ相册", vbYes, "聪聪_版本v1.1"
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End Sub
Private Sub Command2_Click()
If Val(Label3.Caption) < 10000 Then
MsgBox "哇~塞~小于5位数的Q号那里买~呵呵", vbYes, "哎呀(惊讶)"
Command2.Enabled = False
Label3.Caption = ""
ElseIf Val(Label3.Caption) > 9999999999# Then
MsgBox "哇~塞~大哥现在还没有那么长的Q号吧~~呵呵", vbYes, "哎呀(惊讶)"
Command2.Enabled = False
Label3.Caption = ""
Else
Label3.Caption = "http://photo.qq.com/portal/albumMain.shtml?%23uin=" & a & "#uin=" & a
ShellExecute 0, "Open", Label3.Caption, "", App.Path, 0
Label3.Caption = ""
End If
End Sub
Private Sub Image1_Click()
Me.WindowState = 1
End Sub
Private Sub Image2_Click()
End
End Sub