HOW TO SHOW A EXIST MDI

HOW TO SHOW A EXIST MDI

Postby gss200610 » Sun Apr 08, 2012 2:49 am

hello all, I'm trying to put together a function to mdi windows, where I can pass the object and a baction as parameters, so that when opened by a User registration screen and not close, and try to open again, just bring that window already mdi created.

REDEFINE BUTTON BTNCAD ID 50 OF OWNDPRINCIPAL ACTION ( Abremdi ("clients", {| | Register ()) )

Abremdi function (OWND, bAction)

IF &OWND == NIL
EVAL (baction)
ELSE
&OWND: SetFocus ()
ENDIF
RETURN (. T.)

most always returns the last variable in OWND not exist.
if anyone has any function for treatment of mdi can share and appreciate.
gss200610
 
Posts: 36
Joined: Sat Jun 19, 2010 10:09 am
Location: Goiania - Goias - Brasil

Re: HOW TO SHOW A EXIST MDI

Postby ADutheil » Sun Apr 08, 2012 2:46 pm

This is the way I do:
Code: Select all  Expand view
STATIC nJane
STATIC oWndCh

FUNCTION MyFunction

IF nJane != 1
    DEFINE WINDOW oWndCh CHILD OF wndMain()
   
    ACTIVATE WINDOW oWndCh VALID ( nJane := NIL, .T. ) ON INIT ( nJane := 1 )
ELSE
    oWndCh:Restore()
ENDIF
RETURN ( NIL )
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 117 guests