simpleinventor Posted July 26, 2006 Share Posted July 26, 2006 I have a toolbar bitmap that I would like to display only part of the bitmap. I know I could technically cover the undesired parts with other objects, but the bitmap moves and would get ugly to work with. Does anyone know of how to get this done? Thanks, Simple Inventor. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 26, 2006 Share Posted July 26, 2006 You could try using a bitmap that only has that one section in it. You would otherwise have to use drawing functions which can be complicated. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 26, 2006 Share Posted July 26, 2006 HI,maybe this helps, too?!http://www.autoitscript.com/forum/index.ph...amp;hl=croppingSo long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
simpleinventor Posted July 27, 2006 Author Share Posted July 27, 2006 th.meger, that link kinda of worked, but I'm having trouble understanding it. What I figure is that each image is on it's own gui, but is a child of the main. Anyone know how to do that? I can easily do that in java, don't know too much about autoit. Link to comment Share on other sites More sharing options...
simpleinventor Posted July 27, 2006 Author Share Posted July 27, 2006 So I got it to sort-of work. I have a cropped image and I want it to move with the main GUI. The thing is, with the code I have now, if I drag the GUI around, the cropped image only moves when I let go of the mouse (it's pretty obvious to see why.) Is there a way so the pic moves with the GUI no matter what. Here's the code: #include "GUIConstants.au3" #include <Math.au3> $gui=GUICreate("test", 500, 500, 300, 300) $guiPOS = WinGetPos($gui,"") $pic=GUICreate("", 24, 24, $guiPOS[0]+5, $guiPOS[1]+30,$WS_POPUP,$WS_EX_LAYERED,$gui) GUICtrlCreatePic(@ProgramFilesDir & "\K-Meleon\skins\Phoenity(Large)\zoomcold.bmp",0,0, 0,0) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) Do Sleep(10) $guiPOS = WinGetPos($gui,"") WinMove($pic,"", $guiPOS[0] + 5, $guiPOS[1] + 30) until GUIGetMsg() = $GUI_EVENT_CLOSE Link to comment Share on other sites More sharing options...
martin Posted August 6, 2006 Share Posted August 6, 2006 (edited) Have a look at example 2 for GUICtrlCreatePic in the help file. The transparent window moves with the parent window when it's dragged. Instead of $pic=GUICreate("", 24, 24, $guiPOS[0]+5, $guiPOS[1]+30,$WS_POPUP,$WS_EX_LAYERED,$gui) you need $pic=GUICreate("", 24, 24, $guiPOS[0]+5, $guiPOS[1]+30,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) (Hope this is what you mean you want.) Edited August 6, 2006 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
simpleinventor Posted November 3, 2006 Author Share Posted November 3, 2006 That went over my head. Can you explain why? Thanks! Have a look at example 2 for GUICtrlCreatePic in the help file. The transparent window moves with the parent window when it's dragged. Instead of $pic=GUICreate("", 24, 24, $guiPOS[0]+5, $guiPOS[1]+30,$WS_POPUP,$WS_EX_LAYERED,$gui) you need $pic=GUICreate("", 24, 24, $guiPOS[0]+5, $guiPOS[1]+30,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) (Hope this is what you mean you want.) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now