Hi,
Is it possible to make a transparent window with animated .gif ? The higher the transparency of the window (oDlg:nOpacity), the paler the gif image becomes ![]()
Hi,
Is it possible to make a transparent window with animated .gif ? The higher the transparency of the window (oDlg:nOpacity), the paler the gif image becomes ![]()
Thanks Jimmy ! I looked at DWM but didn't understand how I can use it ![]()
Natter wrote:Hi,
Is it possible to make a transparent window with animated .gif ? The higher the transparency of the window (oDlg:nOpacity), the paler the gif image becomes
#include "fivewin.ch"
#include "gif.ch"
function Main()
local oWnd, oGif
DEFINE WINDOW oWnd STYLE WS_POPUP
@ 0,140 GIF oGif SIZE 240,260 FILE "..\gifs\forgif.gif" OF oWnd ;
ADJUST ACTION oWnd:End()
oWnd:nSeeThroClr := CLR_WHITE
ACTIVATE WINDOW oWnd CENTERED
return nil
spectacular master nages.
Regards, saludos.
Rao, excuse me, but I didn't understand how using the nSeeThroClr option would help to get a transparent window. I put together your example and got an animated Gif on a white window
Did you build and run the same sample without any changes atleast once?
Everything works with the "Window", but "Dialog" cannot be made transparent
#include "fivewin.ch"
#include "gif.ch"
function Main()
local oDlg, oGif
DEFINE DIALOG oDlg SIZE 400, 300 PIXEL ;
STYLE WS_POPUP COLOR CLR_BLACK,CLR_WHITE
oDlg:nSeeThroClr := CLR_WHITE
oDlg:bInit := <||
@ 0,140 GIF oGif SIZE 240,260 FILE "..\gifs\forgif.gif" OF oDlg ;
ADJUST ACTION oDlg:End()
return nil
>
ACTIVATE DIALOG oDlg CENTERED ;
return nil#include "fivewin.ch"
#include "gif.ch"
function Main()
local oDlg, oGif
DEFINE DIALOG oDlg SIZE 400, 300 PIXEL ;
STYLE WS_POPUP COLOR CLR_BLACK,RGB(255,254,254)
oDlg:nSeeThroClr := RGB(255,254,254)
oDlg:bInit := <||
@ 0,140 GIF oGif SIZE 240,260 FILE "..\gifs\halo.gif" OF oDlg ;
ADJUST ACTION oDlg:End()
return nil
>
ACTIVATE DIALOG oDlg CENTERED ;
return nil
Everything is fine. Thank you very much.
IMPORTANT:
Now, some explanation about the DATA nSeeThroClr.
When you assign any color value to oWnd/oDlg:nSeeThroClr, that color will be treated as transparent while the window/dialog is displayed.
When you choose a GIF, you should also know its background color. Also choose a gif, whoose background color is perfectly uniform.
While creating the dialog or window, set its colors to:
DEFINE oWnd/oDlg ...... COLOR <anyclr>, <background color of the gif)
Now, set the same background color to oDlg:nSeeThroClr
Yes, you are right, it was in the difference of the background color of the window color :nSeeThroClr that my mistake was ![]()