Hi:
Below is the function I use to cover the entire screen with my form or whatever. I know it seems iverkill, but you need to do it this we to make it work across platforms.
First you need to declare the following:
Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Private Const SWP_SHOWWINDOW = &H40
Private Const SW_NORMAL = 1
Private Const HWND_TOP = 0
Private Const HWND_BOTTOM = 1
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) 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
*******************************************************
'Hides the taskbar by ensuring that the form populates the entire screen
Public Function HideTaskBar(hwnd As Long) As Long
Dim cx As Long
Dim cy As Long
Dim lRet As Long
Dim lRes As Long
' Get full screen width.
cx = GetSystemMetrics(SM_CXSCREEN)
' Get full screen height.
cy = GetSystemMetrics(SM_CYSCREEN)
'cannot be maximized when covering screen
If hwnd <> 0 Then
lRet = ShowWindow(hwnd, SW_NORMAL)
End If
If hwnd <> 0 Then
lRet = SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, _
SWP_SHOWWINDOW)
End If
'get handle of taskbar
hwnd = FindWindow("Shell_Traywnd", ""

lRet = SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Function Joseph Logan
jlogan@softsource.net