|
-
Aug 5th, 2012, 06:13 PM
#1
Thread Starter
New Member
VS 2010 Keyboard disable.
Hello,
I got my splash screen policy to work. I am not looking for a code that will disable keyboard and just have mouse enabled when the policy is on the screen.
My current code is:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Button1.Enabled = False
Button2.Enabled = False
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
Button1.Enabled = True
Button2.Enabled = True
Else
Button1.Enabled = False
Button2.Enabled = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
Form2.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
Form2.Close()
Shell("Shutdown -f -r -t 120")
End Sub
End Class
Thank you
-
Aug 6th, 2012, 12:59 AM
#2
Re: VS 2010 Keyboard disable.
Well in theory you could set the keypreview for the form to true then in the form keypress event you could try e.handled=true
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
|