STANDARD Window -

HMG en Español

Moderator: Rathinagiri

Post Reply
Zimbo
Posts: 50
Joined: Mon Nov 05, 2012 1:28 pm
Location: Scotland
Has thanked: 12 times
Been thanked: 13 times
Contact:

STANDARD Window -

Post by Zimbo » Sat Jan 12, 2019 6:17 pm

I am having problems with a STANDARD window and using ONINTERACTIVECLOSE and ONRELEASE. This generates a syntax error...

Code: Select all

DEFINE WINDOW Win_Admin AT 180, 425 ;
    WIDTH 750 ;
    HEIGHT 500 ;
    TITLE "Test" ;
    WINDOWTYPE STANDARD ;
    ONINTERACTIVECLOSE Logoff(.T.) ;
    ONRELEASE Logoff(.T.)
...
END WINDOW
If I change the WINDOWTYPE to CHILD, it will compile and the program runs as expected.

Am I doing something wrong or is there a limitation with STANDARD windows. I really need this to be a standard window rather than a child window.

Thank you,

Z

User avatar
Anand
Posts: 387
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF
Has thanked: 105 times
Been thanked: 56 times

Post by Anand » Sun Jan 13, 2019 11:29 am

Hi Zimbo,

Please see the #xcommand in i_window.ch

#xcommand DEFINE WINDOW <w> ;
[ <dummy1: OF, PARENT> <parent> ] ;
[ AT <row>,<col> ] ;
[ ROW <row> ] ;
[ COL <col> ] ;
[ WIDTH <wi> ];
[ HEIGHT <h> ];
[ VIRTUAL WIDTH <vWidth> ] ;
[ VIRTUAL HEIGHT <vHeight> ] ;
[ TITLE <title> ] ;
[ ICON <icon> ] ;
[ <main: MAIN> ] ;
[ <child: CHILD> ] ;
[ <panel: PANEL> ] ;
[ <noshow: NOSHOW> ] ;
[ <topmost: TOPMOST> ] ;
[ <noautorelease: NOAUTORELEASE> ] ;
[ <nominimize: NOMINIMIZE> ] ;
[ <nomaximize: NOMAXIMIZE> ] ;
[ <nosize: NOSIZE> ] ;
[ <nosysmenu: NOSYSMENU> ] ;
[ <nocaption: NOCAPTION> ] ;
[ CURSOR <cursor> ] ;
[ ON INIT <InitProcedure> ] ;
[ ON RELEASE <ReleaseProcedure> ] ;
[ ON INTERACTIVECLOSE <interactivecloseprocedure> ] ;
[ ON MOUSECLICK <ClickProcedure> ] ;
[ ON MOUSEDRAG <MouseDragProcedure> ] ;
[ ON MOUSEMOVE <MouseMoveProcedure> ] ;
[ ON SIZE <SizeProcedure> ] ;
[ ON MAXIMIZE <MaximizeProcedure> ] ;
[ ON MINIMIZE <MinimizeProcedure> ] ;
[ ON PAINT <PaintProcedure> ] ;
[ BACKCOLOR <backcolor> ] ;
[ FONT <FontName> SIZE <FontSize> ] ;
[ NOTIFYICON <NotifyIcon> ] ;
[ NOTIFYTOOLTIP <NotifyIconTooltip> ] ;
[ ON NOTIFYCLICK <NotifyLeftClick> ] ;
[ ON GOTFOCUS <GotFocusProcedure> ] ;
[ ON LOSTFOCUS <LostFocusProcedure> ] ;
[ ON SCROLLUP <scrollup> ] ;
[ ON SCROLLDOWN <scrolldown> ] ;
[ ON SCROLLLEFT <scrollleft> ] ;
[ ON SCROLLRIGHT <scrollright> ] ;
[ ON HSCROLLBOX <hScrollBox> ] ;
[ ON VSCROLLBOX <vScrollBox> ] ;
[ <helpbutton: HELPBUTTON> ] ;
[ <main: WINDOWTYPE MAIN> ] ;
[ <child: WINDOWTYPE CHILD> ] ;
[ WINDOWTYPE STANDARD ] ;
[ VISIBLE <visible> ] ;
[ AUTORELEASE <autorelease> ] ;
[ MINBUTTON <minbutton> ] ;
[ MAXBUTTON <maxbutton> ] ;
[ SIZABLE <sizable> ] ;
[ SYSMENU <sysmenu> ] ;
[ TITLEBAR <titlebar> ] ;
[ FONTNAME <FontName> FONTSIZE <FontSize> ] ;

So moving ONINTERACTIVECLOSE before WINDOWTYPE will solve it.

Regards,

Anand
Image

User avatar
vagblad
Posts: 120
Joined: Tue Jun 18, 2013 12:18 pm
DBs Used: MySQL,DBF
Location: Thessaloniki, Greece
Has thanked: 14 times
Been thanked: 23 times

Post by vagblad » Mon Jan 14, 2019 9:41 am

You need to leave spaces in the following:
ON INTERACTIVECLOSE instead of ONINTERACTIVECLOSE
ON RELEASE instead of ONRELEASE

Other than that works fine for me.
Hope it helps.
Vagelis Prodromidis
Email: vagblad@gmail.com, Skype: vagblad

Zimbo
Posts: 50
Joined: Mon Nov 05, 2012 1:28 pm
Location: Scotland
Has thanked: 12 times
Been thanked: 13 times
Contact:

Post by Zimbo » Tue Jan 15, 2019 5:52 pm

Thanks guys. I will give that a try this weekend and report back... Hopefully, it solves my problem!

Z

Zimbo
Posts: 50
Joined: Mon Nov 05, 2012 1:28 pm
Location: Scotland
Has thanked: 12 times
Been thanked: 13 times
Contact:

Post by Zimbo » Thu Jan 17, 2019 3:41 pm

Working great. Thank you. I will spend some time getting to know each of the #xcommand in i_window.ch! Clearly, I needed to move the statements and add the space after the keyword ON.

Code: Select all

DEFINE WINDOW Win_Admin AT 150 ,400 ;
    WIDTH 1280 HEIGHT 875 ;
    TITLE cWin_Title ;
    ON INTERACTIVECLOSE Logoff() ;
    ON RELEASE Logoff() ;
    WINDOWTYPE STANDARD
....
END WINDOW

Post Reply