-
Menu Shortcut
I want to assign Alt+1, Alt+2 and Alt+3 to my form's menus, just like Windows
Media Player. But VB's menu editor doesn't let me. Is there some API that
will let me manually assign a short cut to a menu? If not, how does Windows
Media Player do it? Thanks....
- Fred Dalton
-
Re: Menu Shortcut
Fred,
Code similar to this will work:
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKey1 And Shift = vbAltMask Then
Caption = "Alt1 Pressed"
End If
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Cheers,
Larry Rebich
More tips link to:
http://www.buygold.net/tips.html
Please:
No personal e-mail questions :-)
<Fred Dalton Fred> wrote in message news:3a0f669f$1@news.devx.com...
>
> I want to assign Alt+1, Alt+2 and Alt+3 to my form's menus, just like
Windows
> Media Player. But VB's menu editor doesn't let me. Is there some API that
> will let me manually assign a short cut to a menu? If not, how does
Windows
> Media Player do it? Thanks....
>
> - Fred Dalton
-
Re: Menu Shortcut
Fred,
Code similar to this will work:
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKey1 And Shift = vbAltMask Then
Caption = "Alt1 Pressed"
End If
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Cheers,
Larry Rebich
More tips link to:
http://www.buygold.net/tips.html
Please:
No personal e-mail questions :-)
<Fred Dalton Fred> wrote in message news:3a0f669f$1@news.devx.com...
>
> I want to assign Alt+1, Alt+2 and Alt+3 to my form's menus, just like
Windows
> Media Player. But VB's menu editor doesn't let me. Is there some API that
> will let me manually assign a short cut to a menu? If not, how does
Windows
> Media Player do it? Thanks....
>
> - Fred Dalton
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks