#include "fivewin.ch"
#include "gif.ch"
Static oWnd
Function main()
local oMenu
MENU oMenu
MENUITEM "Prueba" ACTION Prueba()
ENDMENU
DEFINE WINDOW oWnd MENU oMenu
ACTIVATE WINDOW oWnd
Return nil
//----------------------------------------------------------------------------//
Function Prueba()
local oDlg
local oGif
local oSay
DEFINE DIALOG oDlg TITLE "Prueba" SIZE 160, 160 OF oWnd PIXEL
@ 100, 10 SAY oSay PROMPT "TEXTO" OF oDlg PIXEL
ACTIVATE DIALOG oDlg ON INIT CrearGif( oDlg ) NOWAIT
Return nil
//----------------------------------------------------------------------------//
Function CrearGif( oDlg )
local oGif
@ 1, 1 GIF oGif FILE "..\gifs\matrix.gif" OF oDlg ADJUST //SIZE 100, 100
Return nil
//----------------------------------------------------------------------------//
#include "fivewin.ch"
#include "gif.ch"
Static oWnd
Function main()
local oMenu
MENU oMenu
MENUITEM "Prueba" ACTION Prueba()
ENDMENU
DEFINE WINDOW oWnd MENU oMenu
ACTIVATE WINDOW oWnd
Return nil
//----------------------------------------------------------------------------//
Function Prueba()
local oDlg
local oGif
local oSay
DEFINE DIALOG oDlg TITLE "Prueba" SIZE 160, 160 OF oWnd PIXEL
@ 100, 10 SAY oSay PROMPT "TEXTO" OF oDlg PIXEL
ACTIVATE DIALOG oDlg ON INIT CrearGif( oDlg ) NOWAIT
Return nil
//----------------------------------------------------------------------------//
Function CrearGif( oDlg )
local oGif
@ 10, 1 GIF oGif FILE "..\gifs\006.gif" OF oDlg SIZE 100, 100 ;
ACTION( oGif:lAdjust := .F., oGif:Refresh(), oDlg:Refresh() )
Return nil
//----------------------------------------------------------------------------//
oliveiros junior wrote:Olá Cristobal,
Obrigado pela resposta.
Sim vai funcionar, porém se eu colocar
WITH OBJECT oDialog
:bStart := { || Eval( oGif:bLClicked, SysRefresh() ) } // Para execução do codblock que coloquei na criação do objeto Gif
END
Ou
WITH OBJECT oDialog
:bStart := { || Eval( bAcao, SysRefresh() ) } // Para execução do codblock que sem colocar na criação do objeto Gif
END
Mostra o gif mas de forma estática.
Att.,
Oliveiros Junior
:bStart := { || Eval( bAcao, SysRefreh() ), oDialog:End() }
// prueba con
:bStart := { || Eval( bAcao ), SysRefreh(), oDialog:End() }
//----------------------------------------------------------------------------//
// Programa: TESTMT01.PRG
// Autor...: Cristobal Navarro
//----------------------------------------------------------------------------//
#include "Fivewin.ch"
#include "hbthread.ch"
#include "gif.ch"
Static oPnel1
Function Main()
local oWnd
local oBar
local oBtt1
local oBtt2
local uTh1
local uTh2
local uTh3
DEFINE DIALOG oWnd FROM 0, 0 TO 660, 1100 TITLE "Test" PIXEL //MDI
DEFINE BUTTONBAR oBar SIZE 48, 48 OF oWnd
DEFINE BUTTON oBtt1 PROMPT "Salir" OF oBar ACTION oWnd:End() TOOLTIP "Salir"
DEFINE BUTTON oBtt2 PROMPT "Test" OF oBar ;
ACTION ( uTh1 := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @WTest(), "Hello", 120 ),;
uTh2 := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @WTest(), 333, 120 ),;
MsgWait( "Process", "Modal", 10 ))
ACTIVATE DIALOG oWnd ;
ON INIT ( HazPnel( oWnd ), CrearGif( oWnd ) ) ;
VALID ( hb_threadTerminateAll(), .T. )
Return NIL
//----------------------------------------------------------------------------//
Function WTest( u, nF )
local x := 1
if Valtype( u ) = "N"
For x = 1 to 300 step 15
@ nF + x, 60 SAY "Thread 2" OF oPnel1 PIXEL COLOR CLR_BLACK
SysRefresh()
hb_idleSleep( 0.8 )
Next x
else
For x = 1 to 300 step 15
@ nF + x, 4 SAY "Thread 1" OF oPnel1 PIXEL COLOR CLR_RED
SysRefresh()
hb_idleSleep( 0.8 )
Next x
endif
Return nil
//----------------------------------------------------------------------------//
Function HazPnel( oWnd )
@ 50, 400 PANEL oPnel1 OF oWnd SIZE 200, 550
oPnel1:SetColor( CLR_BLACK, CLR_YELLOW )
Return oPnel1
//----------------------------------------------------------------------------//
Function CrearGif( oDlg )
local oGif
@ 60, 10 GIF oGif FILE "..\gifs\matrix.gif" OF oDlg SIZE 100, 100 //ADJUST //
Return nil
//----------------------------------------------------------------------------//
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 24 guests