Not a Member Yet,
Click here to Register
How do you like the new design?






ID: 385
Viewed: 2784
Added: Aug 19, 2002
Version:
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo



User Rated at: 4 Stars4 Stars4 Stars4 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

To make an event happen when a key is pressed, use the KeyPress or KeyDown events.


And to have a menu and make it look like it has that big gap between, as a regular assigned shortcut would, use Chr$(9).

example cut ctl-x <---- this is the shortcut
----------------^ gap

Highlight all by clicking in box
<!---Declaration--->
none

Highlight All
<!---Code--->
'code:

Private Sub Form_KeyPress(KeyAscii As Integer)
'if KeyAscii = ... Then...
MsgBox KeyAscii & Chr$(9) & Chr(KeyAscii)
End Sub

Private Sub Form_Load()
Me.KeyPreview = True
End Sub



'code:

MyMenu.Caption = "Help" & Chr$(9) & "F1";


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 snippetlibrary.com All Rights Reserved. Conditions