Link to home
Start Free TrialLog in
Avatar of mathiv
mathiv

asked on

StausBar

How to disable win95 statusbar while running vb5 application with stausbar
Avatar of lortega
lortega

win95 statusbar = Task Bar??
mathiv,

  Since you said "win95 statusbar", I assume it is taskbar.
  You could use following example to disable or hide taskbar.

---
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0

Private Sub Form_Load()
    Dim hTaskbar As Long
   
    hTaskbar = FindWindow("Shell_TrayWnd", vbNullString)
    If hTaskbar <> 0 Then ' Found it
        ' Disable it (Pass True in 2nd parameter to enable)
        Call EnableWindow(hTaskbar, False)
        ' Or Hide it
        ' Call ShowWindow(hTaskbar, SW_HIDE)
    End If
End Sub
----

Regards.
Avatar of mathiv

ASKER

My question is about windows taskbar. When I try to execute the above answer given by  yowkee I am getting syntax error at the statement "Dim hTaskbar as long".
Avatar of mathiv

ASKER

I tried the answer given by Yowkee in different computer it is working so good. This is what I need. Thankyou for the answer.
ASKER CERTIFIED SOLUTION
Avatar of yowkee
yowkee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial