How can I Resize a dialog to FIT a GIF File display
How can I Resize a dialog to FIT a GIF File display
*
Function GIFwait(lFlag,cMessage,nFontPoint,nColor)
STATIC aBusyDlg[2]
SETDEFAULT cMessage := "Please wait ...", lFlag := .T.
If ValType(aBusyDlg[1]) == "O"
aBusyDlg[1]:destroy()
DC_PointerArrow( AppDesktop() )
EndIf
If lFlag
aBusyDlg := GIFCreateBusyWindow(cMessage,nFontPoint,nColor)
DC_PointerWait( AppDesktop() )
Else
aBusyDlg[2]:pause()
Release aBusyDlg
EndIf
RETURN nil
* -------------
STATIC FUNCTION GIFCreateBusyWindow(cMessage,nFontPoint,nColor)
LOCAL GetList[0], GetOptions, oDlg, oGif
SETDEFAULT nFontPoint := 16, nColor := GRA_CLR_YELLOW
@ 0,0 DCACTIVEXCONTROL oGif SIZE 0,0 CLSID "PLAYGIF.PlayGifCtrl.1"
DCGETOPTIONS NOTITLEBAR BORDER XBPDLG_NO_BORDER
DCREAD GUI FIT MODAL EVAL {|o| oDlg := o, setAppWindow(o), _ConfigGIF(oGif)} EXIT OPTIONS GetOptions
RETURN( {oDlg,oGif} )
*
Static Function _ConfigGIF(oGif)
Local aSize[2]
oGif:AutoSize := .t.
oGif:loadGif(DC_Path(AppName(.t.))+'Globe5.gif')
aSize[1] := oGif:GetWidth()
aSize[2] := oGif:GetHeight()
oGif:play()
Return nil
Re: How can I Resize a dialog to FIT a GIF File display
Try this:
Code: Select all
oDlg:setSize({oGif:getWidth(),oGif:getHeight})
The eXpress train is coming - and it has more cars.
Re: How can I Resize a dialog to FIT a GIF File display
With your code this is what I get. There is still frame at top and left sides.