顯示、隱藏win95工作列

原始來源: Showje (http://www.taconet.com.tw/~showje/tip1.htm)   cww 更改

Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
  (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function ShowWindow Lib "user32" Alias "ShowWindow" _
  (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_SHOW = 5
Public Const SW_HIDE = 0

Private hwnd5 as Long

hwnd5 = FindWindow("Shell_traywnd","")
Call ShowWindow(hwnd5, SW_HIDE) '隱藏工作列


Call ShowWindow(hwnd5, SW_SHOW) '顯示工作列

這不是一個好的方式,如果您將工作列隱藏了,但沒有將之顯示, 那我們只有重新開機才能使之重新出現,當使用者發現叫不出工作列時 ,他可能會很生氣。