|
-
Jun 8th, 2002, 06:09 PM
#1
Thread Starter
Lively Member
set focus to a menu
anyone know how to set focus to a menu? i'm making an app with a system tray menu. it works fine, except you can't control it using the arrow keys of the keyboard unless you right click it first (set focus to it). i've set the parent form as the active window. without that, you can't scroll with the arrow keys even when you do right click.
-
Jun 8th, 2002, 06:26 PM
#2
Need-a-life Member
Try this:
VB Code:
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
SetForegroundWindow Me.hwnd
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Jun 8th, 2002, 08:03 PM
#3
Thread Starter
Lively Member
i've already tried that, along with SetActiveWindow. it sets the focus to the form, but not the menu itself.
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
|
Click Here to Expand Forum to Full Width
|