joey o.
Jan 25th, 2000, 10:41 PM
Hi! I'm working on a children's program and have two questions.I don't want the kids to get into windows apps so I want to disable the start button.
Question 1: Is this dangerous if the program should crash or freeze? I want start button to work if I alt-control-delete.
Question 2: How do I disable start button?
Thank You,
Joey O
joey o.
Jan 26th, 2000, 03:36 AM
Thanks Again Aaron,
Next question:
Same thing but disable Start Key on keyboard.
This dangerous?
Aaron Young
Jan 26th, 2000, 11:18 AM
This Example Disables the StartButton.. If it crashes/freezes then the button will remain Disabled, but you can Still Access the Menu via the Keyboard.
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Sub Command1_Click()
Static bDisabled As Boolean
Dim lHwnd As Long
bDisabled = Not bDisabled
lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
Call EnableWindow(FindWindowEx(lHwnd, 0&, "Button", vbNullString), Not bDisabled)
End Sub
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
ajyoung@pressenter.com