All you have to do is paste this in the general section of your form.
'---------------------------------------------------------------
Option Explicit
Dim hwnd1 As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long,
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As
Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
'-------------------------------------------------------------
'To hide the task bar use this code.
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
'-------------------------------------------------------------
'Use this to show it again.
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
Quote:
>Hi-
> I'm using VB4/16 bit
> Parts of my app needs to use the entire screen. So if Win '95 users
>have their task bars set to "stay always on top" then they lose some
>info at the bottom of the screen. Is there a way for me to temporarily
>hide the task bar? Is this improper etiquette? Or should I rely on the
>user to resize (i.e. shrink) their task bars?
> Thanks,
> Brad Stone