Jump to content

Recommended Posts


i have a img loadit in a GUI done it with:


Load_Img("any Pic", $GUI[0])


DirRemove(@ScriptDir & "\Img_Folder\",1)

Func Load_Img($pic, $hwin)
    $hImage = _GDIPlus_ImageLoadFromFile($pic)
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hwin)

Func MY_WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _WinAPI_RedrawWindow($GUI[0], 0, 0, $RDW_UPDATENOW)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 10, 75, 768, 576) ; Standaard Pal formaat
    _WinAPI_RedrawWindow($GUI[0], 0, 0, $RDW_VALIDATE)

but the image is located in a folder
if i want to delete the dir i said that the img file is in use by Autoit

what can i do?


Gr Merchants

Link to post
Share on other sites

_GDIPlus_ImageLoadFromFile($pic) locks the file! You have to dispose the handle before you can delete it.

But if you dispose it you cannot work with it!

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

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...