topten Posted May 24, 2016 Posted May 24, 2016 Hello. I am trying to create preloader animation on gui. I take one png transparent image, add another etc- supposed to be animation. The problem I am facing: What is the best way of deleting previous image created with gdi plus? ;;;;; In the main code I create a picture: Global $preloader = GUICtrlCreatePic("", 50, 180,0,0) ;;;;; Later on using the function of changing images func preloader() if ($load == 1) then $png ="\1.png" if ($load == 2) then $png ="2.png" if ($load == 3) then $png ="3.png" if ($load == 4) then $png ="4.png" $hImage = _GDIPlus_ImageLoadFromFile($png) $Bmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _WinAPI_DeleteObject(GUICtrlSendMsg($preloader, $STM_SETIMAGE, $IMAGE_BITMAP, $Bmp)) $load = $load+1 if $load>4 then $load=1 endfunc
UEZ Posted May 25, 2016 Posted May 25, 2016 I know that your question has already been asked and answered with examples but I cannot find that thread. Anyhow just check out this example how to play an animated transparent GIF: Same technique can be used for your PNG frames. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now