Search Tools Links Login

Change ShowInTaskbar at Runtime


Visual Basic 6, or VB Classic

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

Original Author: ?še7eN

Inputs

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

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

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 134 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.