README.md

December 5, 2022 · View on GitHub

Change ShowInTaskbar at Runtime

Description

This code will allow you to change the .ShowInTaskBar at runtime. Please Comment and Vote.

More Info

SetShowInTaskbar False, Me.hwnd or SetShowInTaskbar True, Me.hwnd

Submitted On
By�e7eN
LevelBeginner
User Rating5.0 (15 globes from 3 users)
CompatibilityVB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
CategoryMiscellaneous
WorldVisual Basic
Archive File

Source Code

'Window API
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
'Window Constants
Public Const GWL_EXSTYLE = (-20)
Public Sub SetShowInTaskbar(Visible As Boolean, hWnd As Long)
  Dim Ret As Long
  Dim lNewLong As Long
  Select Case Visible
    Case True
      lNewLong = -128
    Case False
      lNewLong = 128
  End Select
  Ret = SetWindowLong(hWnd, GWL_EXSTYLE, lNewLong)
End Sub