AndroidZero

Animated GIF without flickering

9 posts in this topic

#1 ·  Posted (edited)

I want to animate transparent GIFs on my gui.
I searched, read and tested a lot UDFs
At the end none fits to me :(

I wrote my own animated function, but its flickering sometimes just for a miliseconds but still doesnt looks good.

edoF9lt.png

 

Below is my code for Testing and also the GIF images you need for it.
GUIChangeImage() is the Animation Function.

CODE:

;************FOR GATHER HTML SOURCE CODE**********************
#include <IE.au3>
#include <InetConstants.au3>
;************FOR GUI***********
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPIFiles.au3>
;**********FOR BUTTON **********
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
;**********FOR STRINGS **********
#include <StringConstants.au3>
#include <String.au3>
;**********FOR COMBOBOX **********
#include <StringConstants.au3>
#include <EditConstants.au3>
#include <GuiEdit.au3>
#include <GuiComboBox.au3>
;**********FOR FONTS **********
#include <FontConstants.au3>
;**********FOR GIF ANIMATION **********
#include <GIFAnimation.au3>
;**********FOR PROCESS **********
#include <Process.au3>
#include <SendMessage.au3>
#include <GDIPlus.au3>
#include <WinAPIDiag.au3>

Opt("GUIOnEventMode",1)

Global Const $SC_DRAGMOVE = 0xF012
Global $hGUIAccountCreator
Global $graphics_path = @ScriptDir & "\graphics"
Global $fontSize_TextBody = 8.5, $fontName_TextBody = "", $fontWeight_TextBody = $FW_BOLD, $fontColor_TextBody = 0x5A2800







GUI_open_AccountCreator()

Func GUI_open_AccountCreator()
Global $hGUIAccountCreator = GUICreate("Tibia Account Creator - SubZero", 350, 400, -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Close_AccountCreator")

GUICtrlCreatePic($graphics_path & "\WindowAccountCreator.gif", 0, 0, 350, 400)
GUICtrlSetState(-1, $GUI_DISABLE)

;********* GUI CONTROLS (LABELS,INPUTS,COMBOBOXES) **********************************************************************
GUICtrlCreateLabel(" Create New Account", 25,47,103,14,$SS_CENTERIMAGE)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0xFFFFFF)

GUICtrlCreateLabel("Account Name:",30,75,75,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_Acc = GUICtrlCreateInput("",130,75,150,20)

GUICtrlCreateLabel("Email Adress:",30,100,70,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_Email = GUICtrlCreateInput("",130,100,150,20)

GUICtrlCreateLabel("Password:",30,125,55,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_Passwd = GUICtrlCreateInput("",130,125,150,20,$ES_PASSWORD)
GUICtrlSetData($inptBox_Passwd, "")

GUICtrlCreateLabel("Character Name:",30,170,83,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_CharName = GUICtrlCreateInput("",130,170,150,20)

GUICtrlCreateLabel("Sex:",30,195,23,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,$fontSize_TextBody,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,$fontColor_TextBody)
Global $comboBox_sex = GUICtrlCreateCombo("",130,195,150,20,$CBS_DROPDOWNLIST)
;LoadSexIntoComboBox()

GUICtrlCreateLabel("World Location:",30,240,77)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,$fontSize_TextBody,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,$fontColor_TextBody)
Global $comboBox_world = GUICtrlCreateCombo("",130,240,150,20,BitOr($CBS_DROPDOWNLIST, $WS_VSCROLL))
;LoadWorldsIntoComboBox()

Global $label_status = GUICtrlCreateLabel("",20,360,200,30)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;********* GUI CONTROLS (LABELS,INPUTS,COMBOBOXES) **********************************************************************


;********* CONTROL PICS **********************************************************************
Global $btn_randAccName = GUICtrlCreatePic($graphics_path & "\Die_Static.gif", 280, 75, 26, 26)
GUICtrlSetTip($btn_randAccName, "Generate a random account name")
GUICtrlSetCursor($btn_randAccName,0)
;GUICtrlSetOnEvent($btn_randAccName,"GenerateRandomAccName")
GUICtrlSetOnEvent($btn_randAccName,"GUIChangeImage")

Global $btn_x = GUICtrlCreatePic("", 315, 5, 40, 36)
GUICtrlSetTip($btn_x, "Close")
GUICtrlSetCursor($btn_x,0)
GUICtrlSetOnEvent($btn_x,"GUI_Close_AccountCreator")

Global $btn_donate = GUICtrlCreatePic("", 112, 313, 126, 47)
GUICtrlSetTip($btn_donate, "Donate")
GUICtrlSetCursor($btn_donate,0)
;GUICtrlSetOnEvent($btn_donate,"Donate")
;********* CONTROL PICS **********************************************************************

    ;********* GDI+ DRAW **********************************************************************
    _GDIPlus_Startup()
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\X_Tic-Tac-Toe_Token.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_x, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Static.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\btn_donateCC_LG.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_donate, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    _GDIPlus_Shutdown()
    ;********* GDI+ DRAW **********************************************************************

_WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)

GUISetIcon(@ScriptDir & "\TibiaInfo.ico")
GUISetState(@SW_SHOW, $hGUIAccountCreator)
WinSetOnTop($hGUIAccountCreator,"",1)
GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN")

EndFunc




Func GUIChangeImage()
    _GDIPlus_Startup()
    GUICtrlDelete($btn_randAccName)
    Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26)
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame2.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)
    Sleep(100)
    GUICtrlDelete($btn_randAccName)
    Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26)
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame3.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)
    Sleep(100)
    GUICtrlDelete($btn_randAccName)
    Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26)
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame4.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)
    Sleep(100)
    GUICtrlDelete($btn_randAccName)
    Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26)
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame5.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)
    Sleep(100)
    GUICtrlDelete($btn_randAccName)
    Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26)
    GUICtrlSetCursor($btn_randAccName,0)
    GUICtrlSetOnEvent($btn_randAccName,"GUIChangeImage")
    Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Static.gif")
    Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)
    _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)
    _GDIPlus_Shutdown()
EndFunc

Func GUI_Close_AccountCreator()
    Exit
EndFunc

Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)
    _SendMessage($hGUIAccountCreator, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
EndFunc


While 1
    Sleep(10)
WEnd

 

IMAGES:

 

 

btn_donateCC_LG.gif

Die_Frame2.gif

Die_Frame3.gif

Die_Frame4.gif

Die_Frame5.gif

Die_Static.gif

WindowAccountCreator.gif

X_Tic-Tac-Toe_Token.gif

Edited by AndroidZero

Share this post


Link to post
Share on other sites



Anyone got a good Gif Animation UDF ?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I used this UDF before but it didnt work for me well because after using  _GUICtrlCreateGIF(...) the GUI layer was completely misscolored like in my first picture above and it was flickering even more horrible than my own function.
My function is really simple and show every frame with a sleep between. Therefore I needed to save every single frame of my compact gif in my graphics folder.

But here is the GIF you mentioned & the GIFAnimation.au3 that I used before

Die.gif

GIFAnimation.au3

Edited by AndroidZero

Share this post


Link to post
Share on other sites

Try something like this here:

;************FOR GATHER HTML SOURCE CODE**********************
#include <IE.au3>
#include <InetConstants.au3>
;************FOR GUI***********
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPIFiles.au3>
;**********FOR BUTTON **********
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
;**********FOR STRINGS **********
#include <StringConstants.au3>
#include <String.au3>
;**********FOR COMBOBOX **********
#include <StringConstants.au3>
#include <EditConstants.au3>
#include <GuiEdit.au3>
#include <GuiComboBox.au3>
;**********FOR FONTS **********
#include <FontConstants.au3>
;**********FOR PROCESS **********
#include <Process.au3>
#include <SendMessage.au3>
#include <GDIPlus.au3>
#include <WinAPIDiag.au3>

Opt("GUIOnEventMode",1)

Global Const $SC_DRAGMOVE = 0xF012
Global $hGUIAccountCreator
Global $graphics_path = @ScriptDir ;& "\graphics"
Global $fontSize_TextBody = 8.5, $fontName_TextBody = "", $fontWeight_TextBody = $FW_BOLD, $fontColor_TextBody = 0x5A2800


GUI_open_AccountCreator()

Func GUI_open_AccountCreator()
Global $hGUIAccountCreator = GUICreate("Tibia Account Creator - SubZero", 350, 400, -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Close_AccountCreator")

GUICtrlCreatePic($graphics_path & "\WindowAccountCreator.gif", 0, 0, 350, 400)
GUICtrlSetState(-1, $GUI_DISABLE)

;********* GUI CONTROLS (LABELS,INPUTS,COMBOBOXES) **********************************************************************
GUICtrlCreateLabel(" Create New Account", 25,47,103,14,$SS_CENTERIMAGE)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0xFFFFFF)

GUICtrlCreateLabel("Account Name:",30,75,75,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_Acc = GUICtrlCreateInput("",130,75,150,20)

GUICtrlCreateLabel("Email Adress:",30,100,70,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_Email = GUICtrlCreateInput("",130,100,150,20)

GUICtrlCreateLabel("Password:",30,125,55,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_Passwd = GUICtrlCreateInput("",130,125,150,20,$ES_PASSWORD)
GUICtrlSetData($inptBox_Passwd, "")

GUICtrlCreateLabel("Character Name:",30,170,83,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,0x5A2800)
Global $inptBox_CharName = GUICtrlCreateInput("",130,170,150,20)

GUICtrlCreateLabel("Sex:",30,195,23,14)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,$fontSize_TextBody,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,$fontColor_TextBody)
Global $comboBox_sex = GUICtrlCreateCombo("",130,195,150,20,$CBS_DROPDOWNLIST)
;LoadSexIntoComboBox()

GUICtrlCreateLabel("World Location:",30,240,77)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1,$fontSize_TextBody,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1)
GUICtrlSetColor(-1,$fontColor_TextBody)
Global $comboBox_world = GUICtrlCreateCombo("",130,240,150,20,BitOr($CBS_DROPDOWNLIST, $WS_VSCROLL))
;LoadWorldsIntoComboBox()

Global $label_status = GUICtrlCreateLabel("",20,360,200,30)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;********* GUI CONTROLS (LABELS,INPUTS,COMBOBOXES) **********************************************************************


;********* CONTROL PICS **********************************************************************
Global $btn_randAccName = GUICtrlCreatePic("", 280, 75)
GUICtrlSetTip($btn_randAccName, "Generate a random account name")
GUICtrlSetCursor($btn_randAccName,0)
;GUICtrlSetOnEvent($btn_randAccName,"GenerateRandomAccName")
GUICtrlSetOnEvent($btn_randAccName,"GUIChangeImage")

Global $btn_x = GUICtrlCreatePic("", 315, 5, 40, 36)
GUICtrlSetTip($btn_x, "Close")
GUICtrlSetCursor($btn_x,0)
GUICtrlSetOnEvent($btn_x,"GUI_Close_AccountCreator")

Global $btn_donate = GUICtrlCreatePic("", 112, 313, 126, 47)
GUICtrlSetTip($btn_donate, "Donate")
GUICtrlSetCursor($btn_donate,0)
;GUICtrlSetOnEvent($btn_donate,"Donate")
;********* CONTROL PICS **********************************************************************

    ;********* GDI+ DRAW **********************************************************************
    _GDIPlus_Startup()
    Global $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\X_Tic-Tac-Toe_Token.gif")
    Global $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_x, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)

    Global $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\btn_donateCC_LG.gif")
    Global $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_donate, 0x0172, $IMAGE_BITMAP, $hHBMP))
    _GDIPlus_ImageDispose($hImg)

    Global $aGIFs[6]
    For $i = 2 To 5
        $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame" & $i & ".gif")
        $aGIFs[$i - 1] = _GDIPlus_Convert2HBitmap($hImg, 0xD4C0A1, 32, 32)
        _GDIPlus_ImageDispose($hImg)
    Next
    $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Static.gif")
    $aGIFs[0] = _GDIPlus_Convert2HBitmap($hImg, 0xD4C0A1, 32, 32)
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $aGIFs[0]))
    _GDIPlus_ImageDispose($hImg)
    _GDIPlus_Shutdown()
    ;********* GDI+ DRAW **********************************************************************

_WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b)

GUISetIcon(@ScriptDir & "\TibiaInfo.ico")
GUISetState(@SW_SHOW, $hGUIAccountCreator)
WinSetOnTop($hGUIAccountCreator,"",1)
GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN")

EndFunc




Func GUIChangeImage()
    For $i = 1 to 4
        _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $aGIFs[$i]))
        Sleep(200)
    Next
    _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $aGIFs[0]))
EndFunc

Func GUI_Close_AccountCreator()
    For $i = 0 To 5
        _WinAPI_DeleteObject($aGIFs[$i])
    Next
    Exit
EndFunc

Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)
    _SendMessage($hGUIAccountCreator, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
EndFunc


While 1
    Sleep(100)
WEnd

Func _GDIPlus_Convert2HBitmap($hBitmap, $iBgColor, $iNewW = 0, $iNewH = 0)
    Local $iWidth, $iHeight
    If $iNewW Then
        $iWidth = $iNewW
    Else
        $iWidth = _GDIPlus_ImageGetWidth($hBitmap)
    EndIf
    If $iNewH Then
        $iHeight = $iNewH
    Else
        $iHeight = _GDIPlus_ImageGetHeight($hBitmap)
    EndIf
    Local $hBitmap_new = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) ;$aResult[6]
    Local $hCtx_new = _GDIPlus_ImageGetGraphicsContext($hBitmap_new)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtx_new, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
    Local $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $iBgColor)
    _GDIPlus_GraphicsFillRect($hCtx_new, 0, 0, $iWidth, $iHeight, $hBrush)
    _GDIPlus_GraphicsDrawImageRect($hCtx_new, $hBitmap, 0, 0, $iWidth, $iHeight)
    Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_new)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_BitmapDispose($hBitmap_new)
    _GDIPlus_GraphicsDispose($hCtx_new)
    Return $hHBITMAP
EndFunc   ;==>_GDIPlus_Convert2HBitmap

 

1 person likes this

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

@UEZ: Thank you again !! It works sooo goooood :lmao:

Edited by AndroidZero

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • sree161
      By sree161
      Hi,
      i have a code which generates two numeric outputs.i have to save them in excel.
      Is there any way to export them to specific cells in excel???
    • TotalAuto
      By TotalAuto
      Howdy All
      I've gone around and around in circles wasting hours trying to fix this problem to no avail so I thought I would try posting for help given there are some real smart people in this forum.
      Background
      I have 5 separate .au3 scripts that all do different basic tasks. For example:
      1.au3 = opens Chrome browser to obtain information from a specific website then closes
      2.au3 = opens an Excel workbook to run a macro then saves and closes
      3.au3 = Open two seperate workbooks and transfers data from one to the other then saves and closes
      4.au3 = .......etc
      5.au3 = .......etc
      These 5 separate scripts, doing completely different tasks, need to each run once per day at 5 different designated times within a day and then close. For example:
      1.au3 = 10am
      2.au3 = 12pm
      3.au3 = 2pm
      4.au3 = 4pm
      5.au3 = 5pm
      Problem
      I can not get these different scripts to reliably run at their designated times. When I manually run these scripts individually by using 'Go F5' they work perfectly. If I convert these scripts to an .exe and manually run each one they work about 98% of time.
      How can I schedule these different .au3 files or associated .exe files to reliably run each day at different times?
      Attempts To Fix The Issue
      1. I have tried converting each .au3 script into their own .exe file and use Window's Task Scheduler to run these .exe files at their designated time but the success rate  of running each .exe in full, to completion, without error is very low at about 30%. Things that commonly go wrong include a browser not opening but movement still continues on the desk top. Other times things just do not happen at all.
      2. I have Windows 7 64 bit and have tried creating and running both (x86) and (x64) .exe files but again reliability problems exist;
      3. I have also tried moving each .exe file to the My Documents folder as I read someone that keeping your files on your desktop ties your files to individual Windows user profiles which can cause AutoIt operating errors. Not sure if this is correct but thought I would try it anyway. It did not fix my issue.
      4. I installed a program called AlwaysUp which supposedly always reliably runs in the background and will reliably execute your AutoIt script or .exe files. Still have significant reliability issues.
      Therefore, can someone please provide advice on how I can get my 5 different .au3 files to run at 5 designated times through the day, every day, without fail? Overtime I will be creating more and more different .au3 files to run certain tasks throughout the day and do not want to create one large AutoIt file that continually runs and attempts to do all the different tasks itself.
      Any help is very appreciated.
      Thanks
      Dan
       
       
    • hugomito
      By hugomito
      Hi all,
      I built an AutoIt application that interacts with several other applications/software. Now, it's turn to interfact with Visual Studio Team Services (VSTS).
      Does anyone has a blog, demo, script to share?
      Thanks!
    • Viki
      By Viki
      This is my first time here so please dont bombard me that what a silly question I am asking!!
      I have 500 rows (A1:A500) in a spreadsheet and I just want to copy one by one row and then paste into another application and then press enter, loop should repeat this until finishes all 500 rows.
      I have looked at clipget(), clip(put() but dont know how to select next row in next turn. I also looked at Array to store but again no luck. Can some guide me please..
    • DineshPawar
      By DineshPawar
      0down votefavorite   In my current project, Excel macro open AutoIt script using a function Call Shell("location of autoit script").
      For proper functioning of AutoIt script it's need to be close parent Excel workbook, so this closing Excel action is written in AutoIt script itself.
      But as soon as AutoIt script close parent Excel workbook then script get pause and it do nothing.
      How open the AutoIt script from Excel workbook and after that parent Workbook get close?