- Code: Select all Expand view RUN
FUNCTION MsgGet( cTitle, cText, uVar, cBmpFile, cResName, lOculto)
LOCAL oDlg, oGet, oBmp, uTemp:=uVar, lOk:=.F., oFnt
DEFAULT cTitle:="", cText:="", lOculto:=.F.
DEFINE FONT oFnt NAME "Tahoma" SIZE 0,-12
DEFINE DIALOG oDlg FROM 10, 20 TO 18, 59.5 TITLE cTitle FONT oFnt
IF ! Empty( cBmpFile ) .OR. ! Empty( cResName )
IF ! Empty( cBmpFile )
@ 1, 1 BITMAP oBmp FILENAME cBmpFile SIZE 20, 20 NO BORDER OF oDlg ADJUST TRANSPARENT
ENDIF
IF ! Empty( cResName )
@ 1, 1 BITMAP oBmp RESOURCE cResName SIZE 20, 20 NO BORDER OF oDlg ADJUST TRANSPARENT
ENDIF
@ 0.5, 6 SAY cText OF oDlg SIZE 250, 10
@ 1.6, 4 GET oGet VAR uTemp SIZE 80, 12 OF oDlg RIGHT PICTURE "99999999" PASSWORD
ELSE
@ 0.5, 3.3 SAY cText OF oDlg SIZE 250, 10
@ 1.6, 2.3 GET oGet VAR uTemp SIZE 80, 12 OF oDlg RIGHT PICTURE "99999999" PASSWORD
ENDIF
IF( lOculto, oGet:lPassword:=.T., oGet:lPassword:=.F.)
oGet:cTooltip:={ "Medite antes de ingresar cualquier valor","SicefWin "+cVersSW,1,CLR_WHITE,CLR_GREEN }
@ 2.25, 7.5 - If( oBmp==nil, 4, 2 ) BUTTON "&Aceptar" OF oDlg SIZE 35, 12 ACTION ( oDlg:End(), lOk:=.T. ) DEFAULT
@ 2.25, 16.5 - If( oBmp==nil, 4, 2 ) BUTTON "&Cancelar" OF oDlg SIZE 35, 12 ACTION ( oDlg:End(), lOk:=.F. )
oDlg:lHelpIcon:= .F.
ACTIVATE DIALOG oDlg CENTERED ON INIT oDlg:SetIcon(oApp:cIcono)
If lOk
uVar:=uTemp
Endif
oFnt:End()
Return lOk
Dejo el ejemplo para ver si alguien me puede dar una mano, a ver que hago mal.
Saludos
Fernando Espinoza