gifts animados

gifts animados

Postby surGom » Sun Jun 29, 2014 3:43 pm

Hola estoy cambiando los animate del shell32 (dbcopy(),etc) ya que en windows 7 no funcionan, pero me esta costando un poco

EL prg es el siguiente
Code: Select all  Expand view

FUNCTION WaitOn( cText, cCaption, bAction, cImagen )

   LOCAL oSay



   DEFAULT cText   := "Procesando datos..."
   DEFAULT cCaption := ""
   DEFAULT cImagen := "004.gif"

   DEFINE FONT oFont NAME "Arial" SIZE - 10, 14


   IF ValType( oDlgwait ) = "O"
      oDlgwait:End(); oDlgwait := NIL
      SysRefresh()
   endif

   DEFINE DIALOG oDlgwait RESNAME "DIA_MOME"
   oDlgwait:cCaption := cCaption

   oAnimate = TAnimate():Redefine( 160, oDlgwait )
   oAnimate:nstyle := 2


   REDEFINE SAY oSay VAR cText  ID 109 COLOR RGB( 130, 0, 240 ) FONT oFont

   ACTIVATE DIALOG oDlgwait CENTERED  NOWAIT  ON INIT ( oAnimate:= TGif():New( oDlgwait, cImagen,5,10 ))


   SetFocus( oDlgwait:hWnd )
   SysRefresh()
RETURN( oDlgwait )

 


y la imagen que me muestra es

Image

Igualmente el gift en estaparte del programa no se anima debido a que el proceso es un append from

Code: Select all  Expand view
  WaitOn("Creando archivo...")
   APPEND FROM ( cArchivo ) SDF
   WaitOff()


Hay forma de que funcione el gift, hice una prueba con un consejo de Daniel García Gil que envió al foro por algo parecido pero no lo logré en mi caso

Y tambien si se puede usar el shell32 de windows.

Bueno son varias consultas en una

Gracias

Luis

Luis
surGom
 
Posts: 639
Joined: Wed Oct 19, 2005 12:03 pm

Re: gifts animados

Postby Antonio Linares » Tue Jul 01, 2014 6:16 am

Luis,

Llevo un par de dias intentando revisar esto, pero no he tenido tiempo literalmente.

Lo revisamos cuanto antes, disculpa la demora :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41340
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: gifts animados

Postby surGom » Tue Jul 01, 2014 1:51 pm

Gracias Antonio

Luis
surGom
 
Posts: 639
Joined: Wed Oct 19, 2005 12:03 pm

Re: gifts animados

Postby Antonio Linares » Tue Jul 01, 2014 4:16 pm

Luis,

Prueba este ejemplo (desde la carpeta FWH\samples), que te muestra como hacerlo:

Code: Select all  Expand view
// Animated GIFs support for FWH

#include "FiveWin.ch"

function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "Animated GIFs"

   TGif():New( oWnd, "..\gifs\halo.gif", 10, 10 )
   
   ACTIVATE WINDOW oWnd ;
      ON INIT BuildDialog()

return nil

function BuildDialog()

   local oDlg
   
   DEFINE DIALOG oDlg SIZE 400, 300 TITLE "Non modal dialog"
   
   ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
      ON INIT TGif():New( oDlg, "..\gifs\halo.gif", 10, 10 )
   
return nil  


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41340
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: gifts animados

Postby surGom » Wed Jul 02, 2014 12:10 pm

Antonio de hecho el gif en todos los casos en que son bucles (dónde puedo hacer sysrefresh()) funciona, en el único caso en que no funciona es cuando llamo

waiton()
append from ....
waitoff()

Code: Select all  Expand view
#include "fivewin.ch"
#include "Common.ch"

STATIC oDlgwait, oFont, oAnimate

FUNCTION WaitOn( cText, cCaption, bAction, cImagen )

   LOCAL oSay



   DEFAULT cText   := "Procesando datos..."
   DEFAULT cCaption := ""
   DEFAULT cImagen := "004.gif"

   DEFINE FONT oFont NAME "Arial" SIZE - 10, 14

 

   DEFINE DIALOG oDlgwait RESNAME "DIA_MOME"
   oDlgwait:cCaption := cCaption

   oAnimate = TAnimate():Redefine( 160, oDlgwait )
   oAnimate:nstyle := 2


   REDEFINE SAY oSay VAR cText  ID 109 COLOR RGB( 130, 0, 240 ) FONT oFont

   ACTIVATE DIALOG oDlgwait CENTERED  NOWAIT  ON INIT ( oAnimate:= TGif():New( oDlgwait, cImagen,5,10 ) )


   SetFocus( oDlgwait:hWnd )
   SysRefresh()

RETURN( oDlgwait )



FUNCTION WaitOff()

   IF ValType( oDlgwait ) = "O"
      oDlgwait:end(); oDlgwait := NIL
      oFont:end()
      oAnimate:end()
   ENDIF

   SysRefresh()

RETURN NIL


El otro problema es que aleatoriamente respeta el fondo transparente y en otros el fondo aparece en negro, o como mostré la imagen anterior .

Puedo cambiar los fondos por otro color pero perdería la magia de estar mostrandose dobre el color del diálogo

Muchas gracias por tu atención

Luis
surGom
 
Posts: 639
Joined: Wed Oct 19, 2005 12:03 pm

Re: gifts animados

Postby Antonio Linares » Wed Jul 02, 2014 5:34 pm

Luis,

Puedes enviarme el GIF que quieres usar ? gracias

En relación al APPEND FROM ... veamos si permite alguna cláusula en la que se pueda proporcionar un codeblock que llame a SysRefresh()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41340
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: gifts animados

Postby surGom » Thu Jul 03, 2014 10:25 am

Gracias Antonio te en envío el enlace de dos de la imágenes

https://drive.google.com/file/d/0B8UT40 ... sp=sharing
https://drive.google.com/file/d/0B8UT40 ... sp=sharing

Ayer lo instale en una máquina Windows server 2008 y funcionó perfecto
En otra con windows xp aparecía el fondo negro en ambos casos

Y en una con windows 7 funcionó bien , pero en la que hago las pruebas , también con Windoes 7 a veces aparece el fondo negro y otras no.

Muchas gracias por tu generosa atención

Luis
surGom
 
Posts: 639
Joined: Wed Oct 19, 2005 12:03 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests