Window in Taskbar 
Author Message
 Window in Taskbar

Hi,

    I used the API call capCreateCaptureWindow to create a capture pop-up
window for my video board. But when I do this, the window is showned in the
Taskbar (even if a create it as a MDIChild window).

    How, using API calls, can I prevent the window to be showned in the
Windows Taskbar.

Thanks.



Mon, 14 May 2001 03:00:00 GMT  
 Window in Taskbar
Private Declare Function GetWindowLong Lib "user32" Alias
"GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal
dwNewLong As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As
Long, ByVal hWndNewParent As Long) As Long

Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_APPWINDOW = &H40000

Private Sub Form_Load()
    HideFromTaskBar Me.hWnd, True

End Sub

Public Sub HideFromTaskBar(hWnd As Long, bFlag As Boolean)
    'hWnd - handle of the window to hide from task bar
    'bFlag - must be True to hide from  or False to show on
    '        the Task bar.

    Dim lRetVal As Long

    'Get the current style bits
    lRetVal = GetWindowLong(hWnd, GWL_EXSTYLE)

    If bFlag Then
        'Modify the style bits to hide from the task bar
        lRetVal = lRetVal And Not WS_EX_APPWINDOW
      Else
        'Modify the style bits to show on the task bar
        lRetVal = lRetVal Or WS_EX_APPWINDOW
    End If

    'Set the new style bits
    lRetVal = SetWindowLong(hWnd, GWL_EXSTYLE, lRetVal)
End Sub


Quote:

>Hi,

>    I used the API call capCreateCaptureWindow to create a capture pop-up
>window for my video board. But when I do this, the window is showned in the
>Taskbar (even if a create it as a MDIChild window).

>    How, using API calls, can I prevent the window to be showned in the
>Windows Taskbar.

>Thanks.



Mon, 14 May 2001 03:00:00 GMT  
 Window in Taskbar
Hi Raul,

1.Open a new project.
2.Paste the following code to your Form.

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA"
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal
hWndNewParent As Long) As Long

Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_APPWINDOW = &H40000
Private Const WS_EX_TOOLWINDOW = &H80&

Public Sub HideFromTaskBar(hWnd As Long, bFlag As Boolean)
    'hWnd - handle of the window to hide from task bar
    'bFlag - must be True to hide from  or False to show on
    '        the Task bar.

    Dim lRetVal As Long

    'Get the current style bits
    lRetVal = GetWindowLong(hWnd, GWL_EXSTYLE)

    If bFlag Then
        'Modify the style bits to hide from the task bar
        lRetVal = lRetVal And Not WS_EX_APPWINDOW
      Else
        'Modify the style bits to show on the task bar
        lRetVal = lRetVal Or WS_EX_APPWINDOW
    End If

    'Set the new style bits
    lRetVal = SetWindowLong(hWnd, GWL_EXSTYLE, lRetVal)
End Sub

Private Sub Form_Load()
    HideFromTaskBar Me.hWnd, True

End Sub

3. Run the project.

You will notice that the Form1 is not shown on the Task bar.

Regards,
                Stoil

Quote:

> Hi,

>     I used the API call capCreateCaptureWindow to create a capture pop-up
> window for my video board. But when I do this, the window is showned in the
> Taskbar (even if a create it as a MDIChild window).

>     How, using API calls, can I prevent the window to be showned in the
> Windows Taskbar.

> Thanks.



Tue, 15 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Windows In Taskbar

2. modal window and taskbar

3. Help: Make the Windows 95 Taskbar Disappear

4. Windows 95 Taskbar

5. Windows 95 Taskbar

6. Windows 95 Taskbar.

7. Windows 95 Taskbar

8. Maximize window to Taskbar's edge

9. How to avoid Secondar windows in Taskbar by Win16API 0r Win32API for VB3 application

10. Need form to behave like Windows 95 Taskbar.

11. HELP: Need to show windows on taskbar that are stored in an VB ActiveX DLL

12. Windows 95 taskbar

 

 
Powered by phpBB® Forum Software