Jump to content

GUI ControlMove problems

Recommended Posts


Hello. I have a GUI that has a picture in it and I need to move that picture without it being on top of other GUI elements.

This is my code:


#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <GDIPlus.au3>

#Region ### START Koda GUI section ### Form
$Form1 = GUICreate("Map", 600, 600, 2500, 100)
$Map = GUICtrlCreatePic("MapHD.jpg", 0, 0, 4096, 4096)
#EndRegion ### END Koda GUI section ###
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1)
    $hPen = _GDIPlus_PenCreate(0xFF000000,2)
 $MapX = 0
 $MapY = 0
While 1
$MapX= GetMapX()
$MapY= GetMapY

    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE

The function GetMapX and GetMapY are defined in my notepad as a list and it works perfectly fine. but the problem is that the Lines dissappear.(comment out controlMove to see the lines im talking about). Any ideas how to fix it.


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


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.