locked
on key label alt-o not working RRS feed

  • Question

  • Hi All

    I am scratching my head on this simple implementation.  I am using a lot of alt keys in a simple FoxPro program - no forms.  Alt-P, ALT-Q, ALT-R work but ALT-O wanted to revert to the Windows use of that key sequence.  When I added the "set sysmenu to" line of code at the start of the program it eliminated Windows grab on the key sequence but now ALT-O does nothing.  It seems to be ignoring my "on key label alt+o do seto" line of code completely when I press the alt+o key sequence.  Any insights would be greatly appreciated.  This is VFP8.

    Respectfully,

    Ideprize


    Gordon Haas

    Thursday, June 12, 2014 1:44 PM

Answers

  • Hi Gordon,

    every ALT- combination searches your formlabels or active menue for captions that contain a BACKSLASH - LESSER THEN - CHARACTERa-z combination.

    If you press ALT+o with VFP itself, the format menue will open up. So, as long as you don't want to activate any submenue, you might switch to CTRL+any character.

    However, as some combinations are used by VFP they might not work within the programming environment, but only in your compiled exe (-> F1, F2, F10)

    This depends on how you make use of them. ON KEY LABEL will do within the programming environment, the forms keypress method (in case keypreview is set to .T.) won't receive those VFP used combinations.


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011

    • Proposed as answer by Benny Gabel Friday, June 13, 2014 2:34 PM
    • Marked as answer by saahg Friday, June 13, 2014 4:12 PM
    Thursday, June 12, 2014 2:10 PM
    Answerer
  • What is displayed at runtime with

    Messagebox(ON("Key","ALT+O"))

    Eg

    ON KEY LABEL CTRL+F10 Messagebox(ON("Key","ALT+O"))

    Maybe the key command assignment is changed somewhere else, eg in a framework class, I don't know what you're using besides your own code.

    Anyway, if that's as expected "Do Seto", then something else has priority.

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH

    http://www.tmn-systemberatung.de

    • Marked as answer by saahg Friday, June 13, 2014 4:12 PM
    Thursday, June 12, 2014 7:47 PM

All replies

  • Hi Gordon,

    every ALT- combination searches your formlabels or active menue for captions that contain a BACKSLASH - LESSER THEN - CHARACTERa-z combination.

    If you press ALT+o with VFP itself, the format menue will open up. So, as long as you don't want to activate any submenue, you might switch to CTRL+any character.

    However, as some combinations are used by VFP they might not work within the programming environment, but only in your compiled exe (-> F1, F2, F10)

    This depends on how you make use of them. ON KEY LABEL will do within the programming environment, the forms keypress method (in case keypreview is set to .T.) won't receive those VFP used combinations.


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011

    • Proposed as answer by Benny Gabel Friday, June 13, 2014 2:34 PM
    • Marked as answer by saahg Friday, June 13, 2014 4:12 PM
    Thursday, June 12, 2014 2:10 PM
    Answerer
  • What is displayed at runtime with

    Messagebox(ON("Key","ALT+O"))

    Eg

    ON KEY LABEL CTRL+F10 Messagebox(ON("Key","ALT+O"))

    Maybe the key command assignment is changed somewhere else, eg in a framework class, I don't know what you're using besides your own code.

    Anyway, if that's as expected "Do Seto", then something else has priority.

    Bye, Olaf.


    Olaf Doschke - TMN Systemberatung GmbH

    http://www.tmn-systemberatung.de

    • Marked as answer by saahg Friday, June 13, 2014 4:12 PM
    Thursday, June 12, 2014 7:47 PM
  • Thanks Tom for your response.

    I did not follow all what you said but in the name of simplifying I did try the ALT+O sequence after the .exe build - still nothing.  So it is not the IDE.  What I have done is simply changed the ALT+O to ALT+R - it works without incident.  There is something obviously "taking possession" of ALT+O prior to the FoxPro "handler".

    Again thanks for your help.

    Respectfully

    IDEPRIZE


    Gordon Haas

    Thursday, June 12, 2014 8:25 PM
  • Hi Olaf

    I figured I would hear from you.  I am going to implement your suggestion regarding the messagebox "revelation".  I also have the VS 5.0 IDE installed and maybe it is "sitting" on it??  I will let you know what I find.

    Again, thanks Olaf.

    Respectfully,

    IDEPRIZE


    Gordon Haas

    Thursday, June 12, 2014 8:29 PM