#Include "FiveWin.ch"
STATIC oTimer
FUNCTION Inicio()
LOCAL oDlg, oSay1, oSay2 //, oTimer
LOCAL oFont1:=TFont():New("Ms Sans Serif",0,-8,.F.,.t.)
SET DATE BRITISH
SET EPOCH TO 1950
SET CENTURY ON
DEFINE DIALOG oDlg FROM 1,1 TO 100,345 ;
TITLE OemToAnsi("El viacrucis de las actualizaciones") ;
PIXEL TRANSPARENT
oDlg:lHelpIcon := .F.
@ 05,15 SAY oSay1 PROMPT OemToAnsi("Fecha y hora actuales") OF oDlg ;
PIXEL FONT oFont1 SIZE 100,12
@ 05,80 SAY oSay2 PROMPT ": "+DTOC(DATE())+" - "+Time() OF oDlg ;
PIXEL SIZE 100,12 FONT oFont1
@ 30,65 BUTTON "&Salir" OF oDlg PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ON INIT ( Timer( oDlg, oSay2 ) )
oFont1:End()
oTimer:End()
Release All
RETURN NIL
FUNCTION Timer( oDlg, oSay2 )
DEFINE TIMER oTimer INTERVAL 1000 OF oDlg ;
ACTION ( oSay2:VarPut( ": " + DTOC(DATE())+" - " + ;
TIME() ), oSay2:Refresh() )
ACTIVATE TIMER oTimer
RETURN NIL
METHOD SetText( cText ) CLASS TSay
local hDC
DEFAULT ::lTransparent := .f.
::cCaption := If( ::cPicture != nil, Transform( cText, ::cPicture ),;
cValToChar( cText ) )
#ifndef __CLIPPER__
if ::oWnd:oBrush != nil .and. Empty( ::oWnd:oBrush:hBitmap ) .and. ( IsAppThemed() .or. ::lTransparent )
DrawPBack( ::hWnd, hDC := GetDC( ::hWnd ) )
ReleaseDC( ::hWnd, hDC )
endif
#endif
if ! lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), nOr( SS_LEFT, SS_RIGHT, SS_CENTER ) )
::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) ) + 20
endif
SetWindowText( ::hWnd, ::cCaption )
return nil
METHOD SetText( cText ) CLASS TSay
local hDC
DEFAULT ::lTransparent := .f.
::cCaption := If( ::cPicture != nil, Transform( cText, ::cPicture ),;
cValToChar( cText ) )
#ifndef __CLIPPER__
if ::oWnd:oBrush != nil .and. Empty( ::oWnd:oBrush:hBitmap ) .and. ( IsAppThemed() .or. ::lTransparent )
DrawPBack( ::hWnd, hDC := GetDC( ::hWnd ) )
ReleaseDC( ::hWnd, hDC )
endif
#endif
SetWindowText( ::hWnd, ::cCaption )
return nil
if ! lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), nOr( SS_RIGHT, SS_CENTER ) )
::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )
endif
if ! lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), nOr( SS_RIGHT, SS_CENTER ) )
::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )
endif
DEFINE DIALOG oDlg NAME "DLG_LISTA" TITLE cTitle COLOR nRgb(0,0,0),nRgb(238,221,187)
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: cmsoft and 41 guests