Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4271
  • Last Modified:

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

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
josmic
Asked:
josmic
  • 3
  • 3
1 Solution
 
bin_huwairibCommented:
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
 
josmicAuthor Commented:
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
 
bin_huwairibCommented:
josmic,

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


Best regards
Bin Huwairib
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
josmicAuthor Commented:
rebooting to text
0
 
bin_huwairibCommented:
What do you mean by "rebooting to text"?
0
 
josmicAuthor Commented:
I meant to say "test" lost my taskbar, works great
thanks so much.

josmic

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now