avi fails under Vista

avi fails under Vista

Postby Brian Hays » Wed Jun 24, 2009 1:53 am

If I build samples\win32.exe, the avi plays fine under XP but does nothing under Vista.
What's the trick to get it working?
Thanks!
-BH
Brian Hays
 
Posts: 20
Joined: Fri Oct 14, 2005 7:56 am

Re: avi fails under Vista

Postby Rick Lipkin » Wed Jun 24, 2009 2:25 am

Hi Brian ..

Long time .. no see .. Here is my working code for our splash Agency avi .. works with all versions of Windows even Windows 7rc

Rick Lipkin
SC Dept of Health, USA

Code: Select all  Expand view

// playavi.prg

#INCLUDE "FIVEWIN.CH"

//----------------------
Function _Playavi( cDEFA )

LOCAL oDLG, oAVI

IF .not. FILE( cDEFA+"\DHEC.AVI" )
   RETURN(NIL)
ENDIF

DEFINE DIALOG oDLG FROM 0,1  to 24,80   ;
       COLOR "N/N,N/N,N/N,N/N,N/N"  ;
       TITLE "PCAS Data Entry"      ;
       STYLE nOr( WS_THICKFRAME, WS_POPUP )

  @ 1,9.5 VIDEO oAVI FILE ( cDEFA+"\DHEC.AVI" ) of oDLG SIZE 158,100 NOBORDER

ACTIVATE DIALOG oDLG CENTERED  ;
         ON INIT ( oAVI:PLAY(), AviTimer( oDLG, 2.5)  )

oDLG:END()
oAVI:END()

oDLG := NIL
oAVI := NIL

SysReFresh()

RETURN(NIL)

//-------------------
Static Func AviTimer(oDLG, nSECONDS )

LOCAL oTMR

DEFINE TIMER oTMR OF oDLG INTERVAL nSECONDS * 1000 ;
       ACTION ( oDLG:END() )

ACTIVATE TIMER oTMR

RETURN(NIL)

// end playavi.prg
 
User avatar
Rick Lipkin
 
Posts: 2638
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: avi fails under Vista

Postby Brian Hays » Wed Jun 24, 2009 5:09 am

Hey, Rick! Great to hear from you.

Thanks for the code. This issue came up because we had an old
routine with a dialog that used the standard "Copy Files" system
avi (at least I'm pretty sure it's an avi). It turns out it just opens
Shell32.dll to play the standard animations in the TAnimate control.

I haven't played with video yet, but we do have some training videos
we wanted to start showing internally, so I'll definitely be using your
code soon for disk file videos.
But for the moment, we need to get the dialog animations going
under Vista. Any ideas? Or should I get those avi's as discrete files
and play them with the VIDEO command instead?

Thanks!
-BH
Brian Hays
 
Posts: 20
Joined: Fri Oct 14, 2005 7:56 am

Re: avi fails under Vista

Postby Rick Lipkin » Wed Jun 24, 2009 1:40 pm

Brian

Here is one of the \samples .. looks like this is what you need ..

Rick

Code: Select all  Expand view

// Using system AVIs

#include "FiveWin.ch"

function Main()

   local oDlg, oAvi

   DEFINE DIALOG oDlg TITLE "Copying files..."

   @ 1, 1 VIDEO oAvi FILE "..\avis\download.avi" SIZE 134, 30 NOBORDER

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT oAvi:Play()

return nil
 
User avatar
Rick Lipkin
 
Posts: 2638
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: avi fails under Vista

Postby Brian Hays » Wed Jun 24, 2009 9:31 pm

Cool, thanks!
-BH
Brian Hays
 
Posts: 20
Joined: Fri Oct 14, 2005 7:56 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests