porque não consigo de forma nenhuma saber em qual a função corrente estou e nem a form .. esse comando de sair com ESC deveria funcionar .. porquem ele não consegue identificar q está na oMainWnd...
Código: Selecionar todos
INIT WINDOW oMainWnd ;
ICON HIcon():Addresource('AppIcon') ;
MAIN ;
TITLE "CONTROLE - Sistema Integrado de Gestión Comercial";
BACKCOLOR 0x5C4223 ;
FONT oFontDlg ;
AT 0,0 SIZE hwg_Getdesktopwidth() * 0.9, hwg_Getdesktopheight() * 0.9 ;
STYLE WS_POPUP+WS_CAPTION+WS_SYSMENU+WS_SIZEBOX+DS_CENTER ;;
ON EXIT { || If( hwg_MsgYesNo("Certeza que deseas salir?", "Confirmación") == .T., CloseAllDisconeccion(), .F. ) }
Thisform := oMainWnd
oMainWnd:Center()
IF oMainWnd:handle == hwg_GetActiveWindow()
hwg_SetDlgKey( Thisform, 0, VK_ESCAPE, { || Thisform:Close() }, .F. )
ENDIF


