Advertisement
calfred2808

Removing your program from the taskbar at runtime

Nov 10th, 2018
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.38 KB | None | 0 0
  1. '
  2. Private Sub chkTaskbar_Click()
  3. Dim style As Long
  4.  
  5. Hide
  6.  
  7. style = GetWindowLong(hwnd, GWL_EXSTYLE)
  8. If chkTaskbar.value = 0 Then
  9.     If style And WS_EX_APPWINDOW Then
  10.         style = style - WS_EX_APPWINDOW
  11.     End If
  12. Else
  13.     style = style Or WS_EX_APPWINDOW
  14. End If
  15. SetWindowLong hwnd, GWL_EXSTYLE, style
  16.  
  17. App.TaskVisible = CBool(chkTaskbar.value)
  18.  
  19. Show
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement