Couple of Questions

  • Thread starter Thread starter ukjock
  • Start date Start date
U

ukjock

Hey guys and Gals need some help if pos.

I want to stop the user from pressing ALT + F4 to close the program.
is this posbbile or is it built in to windows?

Is it possible to have button once clicked focus on to a tabpage? I
have tried several ways but with no luck:

tabpage3.focus
tapbage3.selected
tabpage3.bringtofront

And finally (I know I only said a couple) I have textbox that I have
added the code:

Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If TextBox1.Text.Length >= 10 Then Button4.Enabled = True
Else Button4.Enabled = False
End Sub

Yet when I type and get to the second character of the box it enables
button4.

Any help appreciated on these.

Mucho Grasis.

c
 
Hi,
Using the following code you can capture the Alt+F4 command. Here is the
code

Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys)
As Boolean
If (keyData = Keys.Alt + Keys.F4) Then
MsgBox("in here")
Return True
End If
End Function

I hope this helps.
Thanks
Anand




Anand Balasubramanian
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top