Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

StausBar

Posted on 1998-06-16
5
137 Views
Last Modified: 2010-05-03
How to disable win95 statusbar while running vb5 application with stausbar
0
Comment
Question by:mathiv
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:lortega
ID: 1463440
win95 statusbar = Task Bar??
0
 
LVL 4

Expert Comment

by:yowkee
ID: 1463441
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.
0
 

Author Comment

by:mathiv
ID: 1463442
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".
0
 

Author Comment

by:mathiv
ID: 1463443
I tried the answer given by Yowkee in different computer it is working so good. This is what I need. Thankyou for the answer.
0
 
LVL 4

Accepted Solution

by:
yowkee earned 50 total points
ID: 1463444
mathiv,

  If you get syntax error at that line, it should be the problem of pasting code. Try remove the space in front of "Dim ...", then it should work.

  I resummit my comment as answer.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question