-
I looked at this thread
http://forums.vb-world.net/showthrea...threadid=40282
And thought - cool, maybe I can add to it and disable the start menu off the Windows key too - thus completely disabling the start menu. I can do this using various registry hacks in NT, but not 98 e.t.c e.t.c
What I really want to do is get a handle to the start menu, and either Destroy the menu :eek: or set it to be invisible... :)
I looked at it using Spy++ and it (windows) seems to create the menu each time, I can't subclass the shell cause its not my process, I think im all outta ideas on this one - anyone got any?
(no real business need for this - just thought it might be a challenge)
-
Why don't you just delete the start button?
-
Hey :D
Download my class @ http://www.geocities.com/despotez/WH/
and use this code to hide (you could also close it but not recommended) the startmenu or the startbutton
Code:
Private Win As New WindowHandler, t&, t2&
Private Sub HideButton()
Dim t&
t = Win.FindWin("Shell_TrayWnd", "")
b = Win.FindWinEx(t, ByVal 0&, "Button", "")
Win.Visible(b) = False
'Optional destroy
'Win.CloseWindow b
End Sub
Private Sub HideMenu()
Dim b&, m&, s&
'This hides the lower part of the startmenu
b = Win.FindWin("BaseBar", "")
m = Win.FindWinEx(b, ByVal 0&, "MenuSite", "")
t = Win.FindWinEx(m, ByVal 0&, "ToolbarWindow32", "")
Win.Visible(t) = False
'Optional destroy:
'Win.CloseWindow t
'and now the top:
s = Win.FindWinEx(m, ByVal 0&, "SysPager", "")
t2 = Win.FindWinEx(s, ByVal 0&, "ToolbarWindow32", "")
Win.Visible(t2) = False
'Optional destroy:
'Win.CloseWindow t2
End Sub
Private Sub Form_Unload(Cancel As Integer)
Win.Visible(t) = True 'Return to normal
Win.Visible(t2) = True 'Return to normal
End Sub
Hope it helps!
Editing ...
you can also disable the button or menu items with
Win.Enabled(hWnd) = False
It greys out the menuItem.
[Edited by Jop on 11-16-2000 at 10:38 AM]