waltzie Posted January 19, 2009 Posted January 19, 2009 (edited) Hi, I've done a sample gui with background: ; Create GUI $gui = GUICreate("Background", 200, 200,-1,-1,$WS_TILEDWINDOW) GuiCtrlSetState(-1,$GUI_DISABLE) $path_background = @ScriptDir & "\myimage.bmp" $background = GUICtrlCreatePic($path_background, 0, 0, 0, 0) EndIf GuiCtrlSetState(-1,$GUI_ENABLE) GUISetState(@SW_SHOW) ; GUI MESSAGE LOOP While GuiGetMsg() <> $GUI_EVENT_CLOSE ; wait till gui is closed WEnd How can I: 1. How to know the image source sizes 2. How to know the Top Left pixel colour 3. How to set default background color 4. How to set the image background to be "Tiled" or "streched" or "window centered"? Thanks for the help WaltZie Edited January 19, 2009 by waltzie
torels Posted January 19, 2009 Posted January 19, 2009 I'd suggest you to use GDI+ Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org
waltzie Posted January 19, 2009 Author Posted January 19, 2009 I solved using $background = GUICtrlCreatePic($path_background, 0, 0, 0, 0) GUICtrlSetResizing($background,$GUI_DOCKSIZE+$GUI_DOCKHCENTER+$GUI_DOCKVCENTER) But sill have a problem! If i add a treeview the visualizzation is bugged! I can't access to Treeview object, minimizing & maximizing the tree object disappear here is the example #Include <GUIConstants.au3> #include <GuiConstantsEx.au3> #Include <GuiTreeView.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> ; Create GUI $gui = GUICreate("Background", 400, 400,-1,-1,$WS_TILEDWINDOW) $path_background = @ScriptDir & "\myimage.jpg" $background = GUICtrlCreatePic($path_background, 0, 0, 0, 0) GUICtrlSetResizing($background,$GUI_DOCKSIZE+$GUI_DOCKHCENTER+$GUI_DOCKVCENTER); Center the image into window $maintree = GUICtrlCreateTreeView(10, 10, 120, 150) $aboutitem = GUICtrlCreateTreeViewItem("About", $maintree) $miscitem = GUICtrlCreateTreeViewItem("Misc", $aboutitem) GUISetState(@SW_SHOW) ; GUI MESSAGE LOOP While GuiGetMsg() <> $GUI_EVENT_CLOSE ; wait till gui is closed WEnd
rasim Posted January 20, 2009 Posted January 20, 2009 You need to disable the picture control: $background = GUICtrlCreatePic($path_background, 0, 0, 0, 0) GUICtrlSetState($background, $GUI_DISABLE)
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