Guest User

Untitled

a guest
Dec 5th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Private Type NOTIFYICONDATA
  3. cbSize As Long
  4. hWnd As Long
  5. uId As Long
  6. uFlags As Long
  7. ucallbackMessage As Long
  8. hIcon As Long
  9. szTip As String * 64
  10. End Type
  11. Private Const NIM_DELETE = &H2
  12. Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
  13. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  14. Private Sub Form_Load()
  15. Dim tskWin As Long
  16. Dim t As NOTIFYICONDATA
  17. Shell "taskmgr.exe", vbHide
  18. Do Until tskWin <> 0
  19. tskWin = FindWindow("#32770", "Windows Task Manager")
  20. Loop
  21. t.hWnd = tskWin
  22. Shell_NotifyIcon NIM_DELETE, t
  23. end sub
Add Comment
Please, Sign In to add comment