Solved

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

Posted on 1998-05-09
6
4,019 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
  • 3
  • 3
6 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 50 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.net 2008 2 59
change vba from autofit to 13.5 width? 4 29
SLMGR Switches Are Not Working On KMS Host 3 93
VB6 - Convert HH:MM into Decimal 8 56
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 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