资源描述:
《这个是关闭桌面所有窗口》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、这个是关闭桌面所有窗口(直接复制上去就ok)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Private Type POINTAPI x As Long y As LongEnd TypePrivate Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As LongPrivate Declare Function WindowFromPoint Lib "user32" (By
2、Val xPoint As Long, ByVal yPoint As Long) As LongPrivate Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As LongDim a(50) As LongDim I As IntegerDim flag As BooleanPrivate Sub Command1_Click()flag = TrueMsgBox "都叫你别冲动了.重启吧~"EndEnd Su
3、bPrivate Sub Form_Load()I = 0flag = faseEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)Text1 = "小鹏提醒你,别激动.!" Cancel = True End SubPrivate Sub Timer1_Timer()Dim lg As Long40On Error Resume Next Dim curhWnd As Long 'Current hWndDim lp
4、As POINTAPIIf flag = False Then Exit SubI = I + 1If I < 50 Then ' Initialize point structure: Call GetCursorPos(lp) ' Which window is the mouse cursor over? curhWnd = WindowFromPoint(lp.x, lp.y) a(I) = curhWnd lg = ShowWindow(a(I), Fal
5、se)Else For j = 1 To 50 lg = ShowWindow(a(j), True) Next jEnd If End Sub这个是修改开始菜单名字的代码Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function GetDl
6、gItem Lib "user32" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As LongPrivate Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As LongPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA"
7、 (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPrivate Const BM_CLICK = &HF5Private Sub Form_Load()Dim h1 As Long, h2 As Longh1 = FindWindow("Shell_TrayWnd", vbNullString)If h1 <> 0 Thenh2 = GetDlgItem(h1, &H130)If h2 <> 0 Then40SetW
8、indowText h2, "小鹏" '这里可以修改自己的文字SendMessage h2, BM_CLICK, 0, ByVal 0&End IfEnd IfEnd Sub这个是翻转屏幕代码