We have two rectangles, with the one labelled "2" is front and, the one labelled "1" in background. However when we click, the fired label is the one created first (in the background) and not the second one (in the front).

Is it normal ?

If yes, is there any way to change this order ? If I create another label after a first one on the same coords, I would the second one to be fired instead of the first one (This is a simplified code I can't just invert the label order creation easily)

Thanks for your help

Edited July 20, 2017 by timmalos

Share this post

Link to post

Share on other sites

InunoTaishou 184

InunoTaishou 184

Both of your layers are the exact same size so if you want to differentiate between them you need to make one smaller. The reason the label is proccing for layer1 is because it's the first one created in the control chain. Might be easier to manually check, yourself, if the user clicks inside the GDI object using a GUIRegisterMsg. Here's how you can do it

AutoIt Windows Screenshooter
Key Features:
takes easily a screenshot from any visible window
capture any region of the desktop incl. freehand capturing
capture GUI controls and GUI menus separately
capture a marked area every x seconds for a duration of y seconds
create a GIF animation from saved frames (Vista or higher os required)
capture to AVI file (without audio!)
takes a screenshot from web sites (available only on Win7+ os and when Aero is enabled)
put images to clipboard to paste to other applications easily
color picker
save image in different formats and also to PDF!
add timestamp to saved images
simple image editing options: greyscale, b&w, invert, rotate +-90°
send image to printer and default email client
preview of captured screens incl. zoom option
multi monitor support
display pixel color under mouse
ruler
basic image editor (paint, highlight, ellipse, rectangle, text and some graphic FX)
watermark captured image
no 3rd party tools or DLLs used - pure AutoIt!
fully portable - no installation is needed
multi language feature (Eng, Ger, Tur, Fra and Rus only)
To do:
capture content of scrollable window/control
capture cascaded menus
Due to DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) limitation some windows cannot be captured properly (GDI+, ProgDVB, etc.) but can take screenshots of hidden windows. One workaround is to use full screen capturing (F11/F12) or "Grab Screen" function! Or try double click with rmb on listview items (beta).
Download source code (7339 downloads previously): AutoIt Windows Screenshooter v1.82 Build 2018-12-13.7z (version 3.3.12.0+ needed!)
You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name!
Download compiled Exe only: 4shared / Media Fire / Softpedia (1.54mb)
Distributing copies of the program in compiled format (exe) must be free of any fee!
-----> click here to Donate!

(Current donators: 1. Cuong N.)
It is designed for Win7+ operating systems with AERO enabled! E.g. on WinXP machines some functions are not working properly and might crash the application!
AV scanners may have a negative impact the execution of compiled exe and might report any malware. I guarantee that there is no malicious code in the source code / exe!!!
Main GUI:

About Intro:

Basic Image Editor:

Watermark:

Click link for an enhanced version of Watermark Image.
Credits:
main code by UEZ
additional code (alphabetical order) by Authenticity, AutoItObject Team, Eemuli, Eukalyptus, funkey, _Kurt, martin, monoceres, ProgAndy, taietel, trancexx, Ward, wolf9228 and Yashied!
mesale0077 for turkish translation
wakillon for french translation
AZJIO for russian translation
Keys:
Main GUI:
User your mouse to scroll preview window or
Numpad 8: Scroll preview window up
Numpad 2: Scroll preview window down
Numpad 4: Scroll preview window left
Numpad 6: Scroll preview window right
Numpad +: zoom in preview window or mouse wheel down
Numpad -: zoom out preview window or mouse wheel up
F1: capture again on last position
F5: refresh Windows Name list
PRINTSCREEN: take screenshot from whole screen
ALT+PRINTSCR: take a screenshot from active window
F10: Undo made changes with Image Editing function
F11: take screenshot from whole screen incl mouse cursor
F12: take screenshot from whole screen
Ctrl+Alt+F9 start "Grab Screen" mode
Ctrl+Alt+F12: take a screenshot from active window using alternative screenshot functionality (beta)!
Ctrl+r: call ruler
Ctrl+s: save current displayed image
Ctrl+x: exit program
ctrl+w: call web grab input field (available only when Aero is enabled)
Ctrl+i: call image editor
Ctrl+m: call watermark editor
Ctrl+z: undo
Only available on Vista+ os: double click with rmb on list items to use alternative screenshot functionality (beta)!
When 'Grab Screen' is clicked you can hold down the ctrl key to switch to 'grab controls' mode. Control under mouse will be framed red.
ctrl + shift will take the screenshot of appropriate control. To capture GUI menus you can press rmb which simulates the lmb. When a menu is opened press shift additionally to capture it.
Press and hold only the shift key to capture any region on the desktop using freehand capturing - release it so capture marked regions!
Or just mark resize able area which you want to grab. Press CTRL key to grab marked area or right mouse button to capture the marked area every x seconds for a duration of y seconds.
When saving the image just enter the extension you wish to use (*.jpg;*.png;*.bmp;*.gif;*.tif;*.pdf). Big thanks to taietel for his PDF UDF!
Image Editor:
s: save
c: copy
n: send
h: highlighter
p: pen
r: rectangle
e: ellipse
a: arrow
o: color
t: text
g: text config
Ctrl+z: undo
Watermark editor:
Ctrl+z: undo

To start the app minimized just call it "Windows Screenshooter.exe /min"
Maybe it is useful for someone...
Any kind of comment is welcome.
Br,
UEZ
Change log:

I was looking into the help file at all the drawing utilities and I was wondering if you draw a translucent line that follows your cursor. Upon looking for ideas I came across this thread (1.0) and saw UEZ's response. I also came across another post that UEZ replied to and found this reply (1.1) where he shows how you can draw on the desktop. This is what I'm looking for however I'd still like to be able to interact with a designated application and have the line/curve/vector passively follow it. Obviously we don't move our cursor very linearly so it would have to be able to draw on vectors. Am I over complicating this?
Any ideas or starting points I should look more into?

Hello,
I am making a program where the button is an image that "changes" when specific conditions are fullfilled. Problem is that these images have different dimensions and when a smaller picture is displayed over a bigger one both will be seen, therefore i would like the images to be hidden, invincible or, alternatively, deleted.
I have tried using _GDIPlus_GraphicsClear() with no luck
However that might just be me not using it right as im quite new to autoit
Here is the code if you want to test run it:
Thanks to everyone helping!