Page 1 of 1

Using DCPUSHBUTTONXP for a startup screen animation

Posted: Sun Mar 03, 2013 7:25 am
by GeneB
The attached program uses DCPUSHBUTTONXP twice for a startup screen animation effect.
The problem is when each button exits DCREAD there is a "flash".
Is there a way to eliminate the flash?
Thanks,
GeneB

Code: Select all

#include  "dcgra.ch"
#include  "bdcolors.ch"

FUNCTION Main()
local oStatic1,oStatic2, GetOptions, getlist:={}

@ 0,0 DCPUSHBUTTONXP ;
      STATIC ;
      SIZE 100,26 ;
      OBJECT oStatic1 ;
      COLOR GRA_CLR_BLACK, BD_COPPER ;
      GRADIENT .8 ;
      RADIUS 40 ;
      CAPTIONARRAY { {"Roadrunner Software from Acme" ;
                       ,GRA_CLR_BLACK ;
                       ,200,100,220,600 ;
                       ,,"20.Arial"} }

DCGETOPTIONS HIDE NOTITLEBAR

DCREAD GUI  FIT OPTIONS GetOptions PARENT @oStatic1 SETAPPWINDOW     ;
   NODESTROY        ;
   EXIT             ;
   EVAL {|o| DC_ZoomTransparent(o) }

DC_Pause(2)

@ 0,0 DCPUSHBUTTONXP ;
      STATIC ;
      SIZE 100,26 ;
      OBJECT oStatic2 ;
      COLOR GRA_CLR_BLACK, BD_COPPER ;
      GRADIENT .8 ;
      RADIUS 40 ;
      CAPTIONARRAY { {"Roadrunner Software from Acme" ;
                       ,GRA_CLR_BLACK ;
                       ,200,100,220,600 ;
                       ,,"20.Arial"} ;
                   , {"This Program Is Licensed Soley To :  Wiley Coyote" ;
                       ,GRA_CLR_BLACK ;
                       ,300,100,420,600 ;
                       ,,"16.Arial Bold"} }

DCGETOPTIONS HIDE NOTITLEBAR

DCREAD GUI FIT OPTIONS GetOptions PARENT @oStatic2 SETAPPWINDOW     ;
   NODESTROY        ;
   EXIT             ;
   EVAL {|o| DC_ZoomTransparent(o) }

// Do Startup Stuff
DC_Pause(10)
oStatic1:destroy()
oStatic2:destroy()
RETURN NIL

Proc AppSys() ; return

Re: Using DCPUSHBUTTONXP for a startup screen animation

Posted: Sun Mar 03, 2013 10:16 am
by rdonnay
This works for me.

Code: Select all

 .. EVAL {|o| DC_ZoomTransparent(o), o:lockUpdate(.t.) }

Re: Using DCPUSHBUTTONXP for a startup screen animation

Posted: Sun Mar 03, 2013 12:08 pm
by hz_scotty
:clap: great

Re: Using DCPUSHBUTTONXP for a startup screen animation

Posted: Sun Mar 03, 2013 4:04 pm
by GeneB
That did it.
As always, thanks again Roger.
GeneB