How can i prevent that F10 brings focus to the menubar
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
How can i prevent that F10 brings focus to the menubar
Hello,
in Windows F10 activates the menubar. How can i prevent this using the express GET-System?
Thanks in advance.
in Windows F10 activates the menubar. How can i prevent this using the express GET-System?
Thanks in advance.
-----------------
Greetings
Markus Walter
Greetings
Markus Walter
- sdenjupol148
- Posts: 151
- Joined: Thu Jan 28, 2010 10:27 am
- Location: NYC
Re: How can i prevent that F10 brings focus to the menubar
Hi Markus,
Have you tried using DCHOTKEY?
You could set xbeK_F10 to something like {|| .T. }
Hope it helps
Bobby
Have you tried using DCHOTKEY?
You could set xbeK_F10 to something like {|| .T. }
Hope it helps
Bobby
Re: How can i prevent that F10 brings focus to the menubar
This will do it:
Code: Select all
#INCLUDE "dcdialog.ch"
#INCLUDE "appevent.CH"
FUNCTION Main()
LOCAL GetList[0], dDate := Date(), oMenuBar, oMenu
DC_ReadGuiHandler( {|a,b,c,d,e,f,g,h|MyHandler(a,b,c,d,e,f,g,h)} )
DCMENUBAR oMenuBar
DCSUBMENU oMenu PROMPT 'Menu' PARENT oMenuBar
DCMENUITEM 'Menu Item' PARENT oMenu
@ 0,0 DCGET dDate
DCREAD GUI
RETURN Nil
* ---------
PROC appsys ; return
* ---------
STATIC FUNCTION MyHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList )
IF nEvent == xbeP_Keyboard .AND. mp1 == xbeK_F10
RETURN DCGUI_IGNORE
ENDIF
RETURN DCGUI_NONE
The eXpress train is coming - and it has more cars.
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
Re: How can i prevent that F10 brings focus to the menubar
Hi Bobby,SbDrakos wrote:Hi Markus,
Have you tried using DCHOTKEY?
You could set xbeK_F10 to something like {|| .T. }
Hope it helps
Bobby
no, this doesn't help. I want to use F10 as a ACCELKEY, but i want to prevent that the XbpMenuBar receives the focus...
-----------------
Greetings
Markus Walter
Greetings
Markus Walter
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
Re: How can i prevent that F10 brings focus to the menubar
Hi Roger,
this was my first test. This prevents that the XbmMenuBar gets focus, but with this i can't use F10 for anything else (f. e. as a ACCELKEY). But this is want i want to do: I want to use F10 as ACCELKEY, but the XbpMenuBar should't receive the focus. BTW, XbpMenuBar receives focus even if it is disabled...
Any other hint?
this was my first test. This prevents that the XbmMenuBar gets focus, but with this i can't use F10 for anything else (f. e. as a ACCELKEY). But this is want i want to do: I want to use F10 as ACCELKEY, but the XbpMenuBar should't receive the focus. BTW, XbpMenuBar receives focus even if it is disabled...
Any other hint?
-----------------
Greetings
Markus Walter
Greetings
Markus Walter
Re: How can i prevent that F10 brings focus to the menubar
Markus,
i use this
DCHOTKEY xbeK_F10 ACTION { || perauft(), DC_GetRefresh( GetList ) }
and have no problem.
i use this
DCHOTKEY xbeK_F10 ACTION { || perauft(), DC_GetRefresh( GetList ) }
and have no problem.
Klaus
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
Re: How can i prevent that F10 brings focus to the menubar
No, it is the same problem with DCHOTKEY. The Menubar gets the focus. perauft() is called, but the menubar has the focus, even if it is disabled.Koverhage wrote:Markus,
i use this
DCHOTKEY xbeK_F10 ACTION { || perauft(), DC_GetRefresh( GetList ) }
and have no problem.
Edit: I don't have MODAL windows. With Modal-Windows it seams to work. But not with my NON-Modal-situation.
-----------------
Greetings
Markus Walter
Greetings
Markus Walter
Re: How can i prevent that F10 brings focus to the menubar
I don't understand why you are having a problem. This works for me:
Code: Select all
#INCLUDE "dcdialog.ch"
#INCLUDE "appevent.CH"
FUNCTION Main()
LOCAL GetList[0], dDate := Date(), oMenuBar, oMenu
DCMENUBAR oMenuBar
DCSUBMENU oMenu PROMPT 'Menu' PARENT oMenuBar
DCMENUITEM 'Menu Item' PARENT oMenu
@ 0,0 DCGET dDate
DCHOTKEY xbeK_F10 ACTION {||msgbox('test')}
DCREAD GUI
RETURN Nil
* ---------
PROC appsys ; return
The eXpress train is coming - and it has more cars.
Re: How can i prevent that F10 brings focus to the menubar
[quote="rdonnay"]I don't understand why you are having a problem. This works for me:
Hi Roger,
Yes, this is working, but you will see that the menubar got focus. This is what Markus want to disable. I don't know if this is possible. The focus for the menubar with F10 is standard Windows behaviour.
Hi Roger,
Yes, this is working, but you will see that the menubar got focus. This is what Markus want to disable. I don't know if this is possible. The focus for the menubar with F10 is standard Windows behaviour.
- Markus Walter
- Posts: 54
- Joined: Thu Jan 28, 2010 12:49 am
- Location: Germany
Re: How can i prevent that F10 brings focus to the menubar
Hi Chris,
hi Roger,
correct Chris. This is my problem. And because i have a "special" Application-Design (non-modal-windows, but opening a new window disable the parent) the problem is real. The Menubar even gets the focus even though it is disabled...
Edit: I have now a "dirty" workaround: I catch the F10-Event in my custom handler and post another keyboardevent and use this keyboard event as a ACCELKEY. Not nice, but a workaround...
hi Roger,
correct Chris. This is my problem. And because i have a "special" Application-Design (non-modal-windows, but opening a new window disable the parent) the problem is real. The Menubar even gets the focus even though it is disabled...
Edit: I have now a "dirty" workaround: I catch the F10-Event in my custom handler and post another keyboardevent and use this keyboard event as a ACCELKEY. Not nice, but a workaround...
-----------------
Greetings
Markus Walter
Greetings
Markus Walter