|
-
Jan 25th, 2000, 11:41 PM
#1
Thread Starter
Hyperactive Member
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
-
Jan 26th, 2000, 04:36 AM
#2
Thread Starter
Hyperactive Member
Thanks Again Aaron,
Next question:
Same thing but disable Start Key on keyboard.
This dangerous?
-
Jan 26th, 2000, 12:18 PM
#3
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.
Code:
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
[email protected]
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|