How can I Resize a dialog to FIT a GIF File display

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

How can I Resize a dialog to FIT a GIF File display

#1 Post by unixkd »

SampleScr.jpg
SampleScr.jpg (66.14 KiB) Viewed 4896 times
How can I Resize a dialog to FIT a GIF File display as in the following code and screen:

*
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

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How can I Resize a dialog to FIT a GIF File display

#2 Post by rdonnay »

Try this:

Code: Select all

oDlg:setSize({oGif:getWidth(),oGif:getHeight})
The eXpress train is coming - and it has more cars.

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: How can I Resize a dialog to FIT a GIF File display

#3 Post by unixkd »

With your code this is what I get. There is still frame at top and left sides.
SampleScr2.jpg
SampleScr2.jpg (58.09 KiB) Viewed 4889 times

Post Reply