
Hiding Windows Taskbar or Disabling Start button
Hiding the start button from a user is *really* bad UI.... I
mean, are you writing a virus that takes over the user's
computer? Or writing Borg 1.0?
Apps shouls not muck with the user's system this way, IMHO.
I would uninstall such a program and never buy anything from
that company again.
Michael
Quote:
> Take a loko at this code:
> 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
Quote:
> lpClassName As String, ByVal lpWindowName As String) As
Long
> Private Declare Function GetWindow Lib "user32" (ByVal
hwnd As Long, ByVal
> wCmd As Long) As Long
> Private Declare Function GetClassName Lib "user32" Alias
"GetClassNameA"
> (ByVal hwnd As Long, ByVal lpClassName As String, ByVal
nMaxCount As Long)
> As Long
> Private Declare Function EnableWindow Lib "user32" (ByVal
hwnd As Long,
> ByVal fEnable As Long) As Long
> Const SWP_HIDEWINDOW = &H80
> Const SWP_SHOWWINDOW = &H40
> Const GW_CHILD = 5
> Const GW_HWNDNEXT = 2
> Const GW_HWNDFIRST = 0
> Private Sub Form_Load()
> Dim Thwnd As Long, Ret As Long, sSave As String, mWnd
As Long
> Thwnd = FindWindow("Shell_traywnd", "")
> mWnd = GetWindow(Thwnd, GW_CHILD Or GW_HWNDFIRST)
> Do
> sSave = Space(255)
> Ret = GetClassName(mWnd, sSave, 250)
> sSave = Left$(sSave, Ret)
> If sSave = "Button" Then
> 'Disable button
> EnableWindow mWnd, False
> 'or hide button
> SetWindowPos mWnd, 0, 0, 0, 0, 0,
SWP_HIDEWINDOW
> Exit Do
> End If
> mWnd = GetWindow(Thwnd, GW_CHILD Or GW_HWNDNEXT)
> Loop
> End Sub
> HTH,
> Pieter Philippaerts
> http://users.turboline.be/btl10148/
> Otto heeft geschreven in bericht ...
> >Is there any way I can either hide or disable the windows
start button??
> >Please Help!!