Antonio Linares wrote:Dear Silvio,
Do you use static oPaziente ?
PUBLIC lLigaBtnOrca := .T.
DEFINE BUTTON oOrcam RESOURCE "ORCAMENTO" OF oBar PROMPT "Orçamento" ;
MESSAGE OemToAnsi( "Gera‡Æo do Or‡amento" ) ;
ACTION( ORCAMENTO( oOrcam ) ) ;
TOOLTIP OemToAnsi( "Gera‡Æo do Or‡amento" ) ;
NOBORDER GROUP WHEN( lLigaBtnOrca )
MENUITEM oMenuOrca PROMPT "&Orçamento" ;
COLORMENU CLR_LGREEN, CLR_HBLUE BOLD ;
LEFTCOLOR CLR_WHITE, CLR_YELLOW ;
COLORPNEL CLR_CYAN, CLR_BROWN ;
COLORSELECT CLR_MSPURPLE, CLR_LGREEN ;
WHEN( lLigaBtnOrca ) ;
RESOURCE "152"
FUNCTION MDI_SILVIO()
lLigaBtnOrca := .F.
BUTTON oExit... ACTION( ..., lLigaBtnOrca := .T. )
RETURN NIL
STATIC oWndChild, lAbreOrcam := .F.
FUNCTION ORCAMENTO( oOrcam )
PUBLIC lFechaJan, lFechaWin, lLigaBtnOrca
lFechaJan := .F.
lFechaWin := .F.
// Para Impedir Uma 2¦ Abertura de Janela!!!
IF lAbreOrcam = .F.
lAbreOrcam := .T.
ELSE
MsgInfo( OemToAnsi( "ATTENTION: " +CRLF+ ;
"THE BUDGET WINDOW IS ALREADY " +CRLF+ ;
"OPENED IN THE PROGRAM WHEEL " +CRLF+ ;
"MAXIMIZE THE WINDOW TO WORK. " +CRLF+ ;
"USE THE <Exit> BUTTON TO CLOSE." +CRLF+ ;
"BEWARE MAY BREAK THE BANKS. " ), ;
OemToAnsi( "WINDOW IS ALREADY OPEN ON WHEEL" ) )
lLigaBtnOrca := .F.
oOrcam:Disable()
oOrcam:Refresh()
lAbreOrcam := .F.
RETURN NIL
ENDIF
....
Static oItem[40], oBtns[20]
DEFINE BUTTON oBtns[1] RESOURCE "paciente" OF ::oBar NOBORDER ;
ACTION TPaziente():New(oItem[1],oBtns[1]):Activar(oItem[1],oBtns[1])
MENUITEM oItem[1] PROMPT "Anagrafica pazienti" ACTION TPaziente():New(oItem[1],oBtns[1]):Activar(oItem[1],oBtns[1]) RESOURCE "pazienti"
MemVar oMOpc, oBBar
IF !Empty(oItem)
oItem:Disable()
ENDIF
IF !Empty(oBtnB)
oBtnB:Disable()
ENDIF
oMOpc:=oItem
oBBar:=oBtnB
METHOD Activar(oItem,oBtnB) CLASS TPaziente
ACTIVATE WINDOW ::oWinClients MAXIMIZED ;
VALID (::oWinClients:=Nil,Exit_Wnd(oItem,oBtnB),.T.)
RETURN NIL
STAT FUNC Exit_Wnd(oItem,oBtnB)
oBtnB:Enable()
oItem:Enable()
RETURN (.T.)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 101 guests