
Hiding/covering 95's task bar
Quote:
> Hello everyone.
> I am writing a VB application (probably in VB 3 or VB 4 for 3.1
> compatibility). I would like for it to be "full screen"-- that is,
> covering everything. I don't think this will be much of a problem with
> 3.1 but what about the task bar in 95? I need the same software to work
> on both. I don't think that making the app fill the screen will cover
> up the task bar in 95.
> Any tips?
For Windows 95 use the following code:
-----
'Hide and Show Taskbar
'The Windows95 Taskbar is one of the major improvements in the Windows
environment. However, sometimes your program may require it to be removed,
since it sometimes does get in the way.
'Well, there is a solution. With this code, you can hide the Taskbar, and
then when you're finished, you can show it again. Use this code:
'Firstly, Declare this in the General Declarations section of the Form:
' From VBIsland
' http://www.*-*-*.com/
Dim hWnd1 As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) 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
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
'
'When you want to hide the Taskbar, use this code:
Public Sub Hide_Task_Bar()
hWnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hWnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub
'and when you want to show it again:
Public Sub Show_Task_Bar()
Call SetWindowPos(hWnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub
-----
But for Windows 3.1, well I don't know.. I have no need to write for it...
:(
Quote:
> Thanks
> Will Hatcher
Cheers,
Colin Sheppard