Analyze Posted October 31, 2009 Share Posted October 31, 2009 (edited) Hi all i need short help with a transparenz background for my Form i only want to see the Graphic layer. Hi have tested so much but dont work and im not a Pro in autoit ^^ Thx if you can help me out #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 808, 516, 302, 218, $WS_POPUP,BitOR($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW)) $Graphic1 = GUICtrlCreateGraphic(80, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic2 = GUICtrlCreateGraphic(80, 56, 377, 41) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic3 = GUICtrlCreateGraphic(424, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic4 = GUICtrlCreateGraphic(80, 424, 377, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited October 31, 2009 by Analyze Link to comment Share on other sites More sharing options...
Analyze Posted October 31, 2009 Author Share Posted October 31, 2009 Have found it by my self thx expandcollapse popup#include <GuiConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $Main_Gui = GUICreate("", 800, 600, 20, 20, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $Graphic1 = GUICtrlCreateGraphic(80, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic2 = GUICtrlCreateGraphic(80, 56, 377, 41) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic3 = GUICtrlCreateGraphic(424, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic4 = GUICtrlCreateGraphic(80, 424, 377, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) GUISetControlsVisible($Main_Gui) GUISetState() While 1 Sleep(1000) WEnd Func GUISetControlsVisible($hWnd) Local $aM_Mask, $aCtrlPos, $aMask $aM_Mask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0) $aLastID = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", GUICtrlGetHandle(-1)) For $i = 3 To $aLastID[0] $aCtrlPos = ControlGetPos($hWnd, '', $i) If Not IsArray($aCtrlPos) Then ContinueLoop $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", _ "long", $aCtrlPos[0], _ "long", $aCtrlPos[1], _ "long", $aCtrlPos[0] + $aCtrlPos[2], _ "long", $aCtrlPos[1] + $aCtrlPos[3]) DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2) Next DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aM_Mask[0], "int", 1) EndFunc Link to comment Share on other sites More sharing options...
Yashied Posted October 31, 2009 Share Posted October 31, 2009 Alternatively. #Include <GUIConstantsEx.au3> #Include <WinAPI.au3> ;#Include <WinAPIEx.au3> #Include <WindowsConstants.au3> $hForm = GUICreate("Form2", 808, 516, 302, 218, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED)) GUISetBkColor(0xABABAB) _WinAPI_SetLayeredWindowAttributes($hForm, 0xABABAB, 0, $LWA_COLORKEY) $Graphic1 = GUICtrlCreateGraphic(80, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic2 = GUICtrlCreateGraphic(80, 56, 377, 41) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic3 = GUICtrlCreateGraphic(424, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic4 = GUICtrlCreateGraphic(80, 424, 377, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Zedna Posted October 31, 2009 Share Posted October 31, 2009 Look into helpfile at example for _WinAPI_SetWindowRgn() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Dolemite50 Posted November 1, 2009 Share Posted November 1, 2009 Alternatively. #Include <GUIConstantsEx.au3> #Include <WinAPI.au3> ;#Include <WinAPIEx.au3> #Include <WindowsConstants.au3> $hForm = GUICreate("Form2", 808, 516, 302, 218, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED)) GUISetBkColor(0xABABAB) _WinAPI_SetLayeredWindowAttributes($hForm, 0xABABAB, 0, $LWA_COLORKEY) $Graphic1 = GUICtrlCreateGraphic(80, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic2 = GUICtrlCreateGraphic(80, 56, 377, 41) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic3 = GUICtrlCreateGraphic(424, 56, 33, 393) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) $Graphic4 = GUICtrlCreateGraphic(80, 424, 377, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd (Switch comment from WinAPIEx to WinApi to avoid errors) 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