I have a command button user control whose caption is &Clear.
Is it possible to create a hotkey for this button using Alt-C
&Clear as caption is Alt-C hotkey, so if its not working then you might want
to check the code under that command button to see if thats where you problem is.
No actually I have made a user control whose caption is '&Clear' to make it look alike normal VB Command Button.
The user control works same as command button except for the shortcut key.
For the user control I have used a picture clip and a lable
You made an user control, and it must have the AccessKey. Does this correct?
To set access key for yor control, you must use:
UserControl.Acc essKey = "C" 'or any alphabet you want
You can determine which should be the accesskey by analyze the "Caption" property of this control. The accesskey must be the Character following the Ampersand symbol.
The event will be fired when the accesskey press must be definition in
Private Sub UserControl_Acc esskeyPressed(k eyAscii As Interger)
'example
Call UserControl_Cli ck
End Sub
Private Sub UserControl_Cli ck()
'do smthing else
RaiseEvent Click
End Sub
Comment