VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change ShowInTaskbar at Runtime

by �e7eN (23 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

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

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

Rate Change ShowInTaskbar at Runtime

'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

Download this snippet    Add to My Saved Code

Change ShowInTaskbar at Runtime Comments

No comments have been posted about Change ShowInTaskbar at Runtime. Why not be the first to post a comment about Change ShowInTaskbar at Runtime.

Post your comment

Subject:
Message:
0/1000 characters