Jlack0700 0 Report post Posted July 11, 2006 First Attempt : 0 replies Cropping images rather than resizing on a GUI. I just need a possible / probable / impossible on this one. Any help appreciated here. Share this post Link to post Share on other sites
nfwu 3 Report post Posted July 11, 2006 (edited) Possible. #) edit: Here is an example: expandcollapse popup#include "GUIConstants.au3" #include <Math.au3> $gui=GUICreate("test transparentpic", 200, 100) $pic=GUICreate("", 80, 71, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",0,0, 0,0) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) Const $MAX_WIDTH = 80, $MAX_HEIGHT = 71 HotKeySet("{LEFT}", "left") HotKeySet("{RIGHT}", "right") HotKeySet("{DOWN}", "down") HotKeySet("{UP}", "up") Do Sleep(10) until GUIGetMsg() = $GUI_EVENT_CLOSE Func left () $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0],$picPos[1],_Max($picPos[2]-10, 0),$picPos[3]) EndFunc Func right() $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0],$picPos[1],_Min($picPos[2]+10, $MAX_WIDTH),$picPos[3]) EndFunc Func down() $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0],$picPos[1],$picPos[2],_Min($picPos[3]+10,$MAX_HEIGHT)) EndFunc Func up() $picPos = WinGetPos($pic) WinMove($pic,"",$picPos[0],$picPos[1],$picPos[2],_Max($picPos[3]-10,0)) EndFunc See what happens when you press the arrow keys. #) Edited July 11, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Share this post Link to post Share on other sites
Jlack0700 0 Report post Posted July 11, 2006 (edited) Thank you so much. You have no idea how much time you saved me with $WS_EX_MDICHILD that I was completely unaware of. Also, I had thought about creating a seperate window but did not realize that window ordering allowed the child to permanently stay in front of the parent. Well, it does, but now I have found autoit can't handle multiple stacked child windows correctly in all regards (I already have one much more important one) so this method can't apply unfortunately. Please, anyone, anything else? Edited July 11, 2006 by Jlack0700 Share this post Link to post Share on other sites