Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ShowWindow(FindWindow("SHELL_TRAYWND", ""), SW_HIDE)

Posted on 1998-05-09
6
Medium Priority
?
4,202 Views
Last Modified: 2008-02-01
I found some code to hide the taskbar, but I get error
file not found "shell_traywnd", how can I fix this or
code to hide and re-enable the taskbar in Vb5 /win 95
much appreciated
0
Comment
Question by:josmic
[X]
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
  • 3
  • 3
6 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 200 total points
ID: 1444861
josmic,

Try the following code:

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

Private Sub Command1_Click()
 hwnd1 = FindWindow("Shell_traywnd", "")
 Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub

Private Sub Command2_Click()
 Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub


Best regards
Bin Huwairib
0
 

Author Comment

by:josmic
ID: 1444862
bin huwairib
I cant seem to enable the task bar back, think I quit between
disable and enable attemps, if that has anything to do with it.

0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1444863
josmic,

You have to show the task bar before quiting otherwise it will remain invisible.


Best regards
Bin Huwairib
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:josmic
ID: 1444864
rebooting to text
0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1444865
What do you mean by "rebooting to text"?
0
 

Author Comment

by:josmic
ID: 1444866
I meant to say "test" lost my taskbar, works great
thanks so much.

josmic

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

660 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