Jump to content
AndroidZero

Animated GIF without flickering

Recommended Posts

AndroidZero

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
KaFu
AndroidZero

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
UEZ

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

 

  • Like 1

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
AndroidZero

@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

    • DynamicRookie
      By DynamicRookie
      Hey there!
       
      Is there a way to detect movement only for 1 specific window?

      HWnd is not really working, it still detects movement in all the windows within the region

      This is my script:
       
      ;Checksum actual HotKeySet("{f2}", 'exit_') MsgBox(0, '', '0') Beep(500, 2000) $Hwnd = WinActive('') while 1 $Checksum = PixelChecksum(211, 650, 1094, 914, 1, $Hwnd) If PixelChecksum(211, 650, 1094, 914, 1, $Hwnd) <> $Checksum Then For $i = 1 To 100 Beep(1000, 50) Next MsgBox(0, '', 'New message!', 1) EndIf WEnd Func exit_() Beep(500, 1000) Exit 0 EndFunc I just want to check whenever a message comes because the app i use doesn't give notifications properly.

      Any help is really appreciated!
    • PramodR
      By PramodR
      Can you please see whats wrong im doing in the below code? i can read few registry entry but not all for eg, i am able to get value of "Shell" Key from the registry path  but not AutoAdminLogon which has the value of "1", is there any change i have to do to read numeric values?
       Global  $shello = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell" )
       ConsoleWrite("This is Hello"& $shello)
      above command returns proper value , but same command with AutoAdminLogon returns null as shown in below ? infact registry has the value of 1.
       Global  $shello = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon" )
       ConsoleWrite("This is Hello"& $shello)
    • Eminence
      By Eminence
      Hello,
      I've been searching on how to select the first row in my database which includes a time column based on the latest start_time date for today's date.
      This is my current code:
      Local $iCurrentDate = _Now() Local $sqlHandle = _dbOpen($sDbPath) Local $aResult, $iRows, $iCols _SQLite_GetTable2d($sqlHandle, "SELECT start_time FROM " & $srawDb & " ORDER BY datetime(start_time) DESC LIMIT 1", $aResult, $iRows, $iCols) _ArrayDisplay($aResult) _dbClose($sDbpath) What it does is it gets the first row entry in the database however it does not select the latest start_time entry in the database, it always select the first row. I've tried changing DESC to ASC to see if that will do it but the issue still remains. Any thoughts on this? Thanks in advance.
       
      *EDIT
      The date format in the database is by MM/DD/YYYY HH:MM:SS.
    • Trisha
      By Trisha
      Hello,
      I Have clicked on save as option to save a file, while doing that I need to rename a file appending with sysdate. I have searched in google find the below one line of code:
      FileMove("C:\somefile.txt", "C:\somefile1.txt"), When I am trying to append with sysdate. It is not happening. Please help me out  with the small issue.
    • TrashBoat
      By TrashBoat
      hey i would like to know if its possible to take a string like this
      $string = "onethousandninehundredeightyfive" and convert it into:
      $string = "one thousand nine hundred eighty five" i have something going on here but its no use
      $string = "onethousandninehundredeightyfive" Global $array[9] = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] Global $array1[19] = ['onethousand', 'twothousand', 'threethousand', 'fourthousand', 'fivethousand', 'sixthousand', 'seventhousand', 'eightthousand', 'ninethousand','tenthousand','hundred', 'twohundred', 'threehundred', 'fourhundred', 'fivehundred', 'sixhundred', 'sevenhundred', 'eighthundred', 'ninehundred'] MsgBox(0, 0, AddSpaces($string)) Func AddSpaces($string) Local $finalStr $length = StringLen($string) For $x = 0 To $length Local $trim = StringTrimRight($string, $x) For $h = 0 To 18 If $trim = $array1[$h] Then $finalStr = $finalStr & " " & $trim $string = StringTrimLeft($string, $h) $length = StringLen($string) EndIf Next For $z = 0 To 8 If $trim = $array[$z] Then $finalStr = $finalStr & " " & $trim $string = StringTrimLeft($string, $z) $length = StringLen($string) EndIf Next Next Return $finalStr EndFunc ;==>AddSpaces  
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.