ON KEY ESCAPE blocks ESC key for all applications running on system...
Posted: Thu Nov 03, 2016 1:45 pm
My friend Edward found problem with On Key ESCAPE...
He built app running i n system tray which is ESC sensitive.
But, ESC key is blocked for all running application, until his app is placed in tray.
Try to compile his small sample
You should run another application which waits for ESC to observe bad working.
Regards, Marek
He built app running i n system tray which is ESC sensitive.
But, ESC key is blocked for all running application, until his app is placed in tray.
Try to compile his small sample
Code: Select all
#include "hmg.ch"
PROCEDURE Main()
DEFINE WINDOW frmMain ;
AT 0,0 ;
WIDTH 800 HEIGHT 500 ;
TITLE 'Test' ICON 'R';
MAIN;
ON INIT (frmMain.Minimize, msgbox('The "Escape" will not work in the system until you restore "R" application from the tray'));
NOTIFYICON 'R' ;
NOTIFYTOOLTIP 'Test' ;
ON NOTIFYCLICK frmMain.Restore;
ON MINIMIZE frmMain.Hide;
VISIBLE .F.
DEFINE NOTIFY MENU
ITEM 'Restore' ACTION frmMain.Restore
SEPARATOR
ITEM 'Exit' ACTION frmMain.Release
END MENU
DEFINE MAIN MENU
DEFINE POPUP '&Exit' NAME menu_xit
MENUITEM 'Exit' ACTION IF(MsgYesNo('Exit?',,.T.),ThisWindow.Release,Nil)
END POPUP
END MENU
END WINDOW
ON KEY ESCAPE of frmMain ACTION IF(MsgYesNo('Exit?',,.T.),frmMain.Release,Nil)
CENTER WINDOW frmMain
ACTIVATE WINDOW frmMain
QUIT
RETURN // Main()
You should run another application which waits for ESC to observe bad working.
Regards, Marek