Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Function Keys in a Form

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
Hi!!

I would like to disable 3 function keys in a Form

F1 - I do not want the users to get the help from microsoft
F7 - I do not want the user to invoke the spell checker.
F11 - I do not want the user to minimize the form, I want to keep it maximized.

I Thought maybe when I get the keystroke, I can assign it to null, or for example when the user will press F11 I will maximize it right away. So I would like some suggestions on this, because I do not know how to do this.

Thanks in advance for all you smart people out there.
 
F11 can be disabled by going to tools/startup/advance and unchecking use special access keys.


You can capture F1 and F7 them using key preview (set to true)and the key down event.

Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If keycode = 118 or keycode = 112 then
keycode = 0
Else
End If

End Sub
[\code] Tyrone Lumley
augerinn@gte.net
[URL unfurl="true"]http://server47.hypermart.net/databaseguy[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top