視窗代碼:
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Sub Form_Load()
Dim hwnd As Long
hwnd = GetWindow(Me.hwnd, 4)
ShowWindow hwnd, 0 '讓程式不在任務管理的任務欄顯示
SetWindowLong Me.hwnd, -20, 128
SetWindowLong Me.hwnd, -20, 0 '讓程式不在桌面功能表的任務欄顯示
End Sub |