extraloob Posted February 5, 2009 Share Posted February 5, 2009 I want to add backround image my gui. I try it but old buttons,labels etc. were hidden. How do it? Link to comment Share on other sites More sharing options...
sandin Posted February 5, 2009 Share Posted February 5, 2009 (edited) this takes your desktop background image, or change $picture to some other picture location... #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 800, 600) $picture = GUICtrlCreatePic(@UserProfileDir & "\Local Settings\Application Data\Microsoft\Wallpaper1.bmp", 0, 0, 800, 600) GUICtrlSetState(-1, $GUI_DISABLE) $Button1 = GUICtrlCreateButton("Button1", 16, 336, 121, 33, -1, $WS_EX_TRANSPARENT) $Input1 = GUICtrlCreateInput("Input1", 16, 8, 177, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited February 5, 2009 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 5, 2009 Moderators Share Posted February 5, 2009 extraloob,DO NOT DOUBLE POST IN DIFFERENT FORAI have already answered you in GUI help.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Israelguy Posted February 5, 2009 Share Posted February 5, 2009 Hi, I want to change the desktop pic at a remote computer in my LAN. I know i can replace the "Wallpaper1.bmp" file with the desired one. The question is, how I make the remote desktop background refresh itself? tnx Link to comment Share on other sites More sharing options...
KaFu Posted February 5, 2009 Share Posted February 5, 2009 Tweak from helpfile. Problem: Most controls can not be set to use a transparent background ($GUI_BKCOLOR_TRANSPARENT), thus would have a grey frame. Work-around: Draw a disabled colored label where you want to place controls as background for these controls. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <WinAPI.au3> Global $hGUI, $hImage, $hGraphic, $hImage1 ; Create GUI $hGUI = GUICreate("Show PNG", 350, 300) ; Load PNG image _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile("background.png") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) GUICtrlCreateLabel("", 5, 5, 100, 40) GUICtrlSetBkColor(-1, 0xffffff) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateCheckbox("Test", 10, 10) GUICtrlSetBkColor(-1, 0xffffff) GUIRegisterMsg($WM_PAINT, "MY_WM_PAINT") GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() ; Draw PNG image Func MY_WM_PAINT($hWnd, $Msg, $wParam, $lParam) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, 0, 0, _GDIPlus_ImageGetWidth($hImage), _GDIPlus_ImageGetHeight($hImage)) Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_PAINT OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Israelguy Posted February 5, 2009 Share Posted February 5, 2009 is the answer for my question? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 5, 2009 Moderators Share Posted February 5, 2009 Israelguy,No, that is an answer for the OP.Now, welcome to AutoIt and these forums.But please do try and obey the rules, one of which is - Do not hijack threads. If you have a question to ask, start a new thread. Otherwise it can get very confusing. ;-)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Israelguy Posted February 5, 2009 Share Posted February 5, 2009 Israelguy,No, that is an answer for the OP.Now, welcome to AutoIt and these forums.But please do try and obey the rules, one of which is - Do not hijack threads. If you have a question to ask, start a new thread. Otherwise it can get very confusing. ;-)M23Hi M23,Sorry I'm new. I thought that in like other forums the taget is to reduct as much the threads. 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