eri Posted February 8, 2010 Share Posted February 8, 2010 For All people in this Forum.. Can U post a simple sample Gui In Transparant..?? Thank`s... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 8, 2010 Moderators Share Posted February 8, 2010 eri,You use WinSetTrans - like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xFF0000, $hGUI) WinSetTrans($hGUI, "", 100) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndM23 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...
eri Posted February 8, 2010 Author Share Posted February 8, 2010 eri, You use WinSetTrans - like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xFF0000, $hGUI) WinSetTrans($hGUI, "", 100) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 Thank`s Melba.. Link to comment Share on other sites More sharing options...
eri Posted February 8, 2010 Author Share Posted February 8, 2010 I`m sorry Melba.. Ones again.. How to set Only in Background Not for All Gui...? Sample in this In Help Menu..* expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $button1, $button2, $button3, $button4, $hGUI Local $button5, $buttonclose $hGUI = GUICreate("test", 240, 180) GUISetBkColor(0xFF0000, $hGUI) WinSetTrans($hGUI, "", 10) $button1 = GUICtrlCreateButton("1", 0, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 5) $button2 = GUICtrlCreateButton("2", 40, 00, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 7) $button3 = GUICtrlCreateButton("3", 80, 00, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 22) $button4 = GUICtrlCreateButton("4", 120, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 23) $button5 = GUICtrlCreateButton("5", 160, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 32) $buttonclose = GUICtrlCreateButton("close", 200, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 28) GUISetState() ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button1 ; Case $button2 ; Case $button3 ; Case $button4 ; Case $button5 ; Case $buttonclose ExitLoop Case Else EndSwitch WEnd GUIDelete() EndFunc ;==>_Main I want Only For Background and Icon Not Transparant? Thank`s Again.. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 8, 2010 Moderators Share Posted February 8, 2010 eri, This the best I can do at the moment: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <WinAPI.au3> Opt('MustDeclareVars', 1) Global $iX, $iY, $hGUI, $hGUI_child _Main() Func _Main() Local $button1, $button2, $button3, $button4 Local $button5, $buttonclose ; Create main GUI $hGUI = GUICreate("test", 240, 40) $button1 = GUICtrlCreateButton("1", 0, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 5) $button2 = GUICtrlCreateButton("2", 40, 00, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 7) $button3 = GUICtrlCreateButton("3", 80, 00, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 22) $button4 = GUICtrlCreateButton("4", 120, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 23) $button5 = GUICtrlCreateButton("5", 160, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 32) $buttonclose = GUICtrlCreateButton("close", 200, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 28) GUISetState() ; Get main GUI position Local $aPos = WinGetPos($hGUI) $iX = $aPos[0] $iY = $aPos[1] + 66 ; Create child GUI $hGUI_child = GUICreate("", 244, 100, $iX, $iY, BitOR($WS_POPUP, $WS_BORDER), -1, WinGetHandle(AutoItWinGetTitle())) GUISetBkColor(0xFF0000, $hGUI_child) WinSetTrans($hGUI_child, "", 100) GUISetState() ;Register move event to keep child synchroed with main GUIRegisterMsg($WM_MOVE, "My_WM_MOVE") ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button1 ; Case $button2 ; Case $button3 ; Case $button4 ; Case $button5 ; Case $buttonclose ExitLoop Case Else EndSwitch WEnd GUIDelete() EndFunc ;==>_Main Func My_WM_MOVE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd <> $hGUI Then Return Local $aPos = WinGetPos($hGUI) WinMove($hGUI_child, "", $aPos[0], $aPos[1] + 66) EndFunc ;==>My_WM_MOVE Making holes in GUIs is easy - making the holes partially transparent is a lot harder! I will keep looking. 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...
Moderators Melba23 Posted February 8, 2010 Moderators Share Posted February 8, 2010 eri, Getting better! expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <Constants.au3> #include <WinAPI.au3> Opt('MustDeclareVars', 1) Global $iX, $iY, $hGUI, $hGUI_child _Main() Func _Main() Local $button1, $button2, $button3, $button4 Local $button5, $buttonclose ; Create main GUI $hGUI = GUICreate("test", 240, 140) $button1 = GUICtrlCreateButton("1", 0, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 5) $button2 = GUICtrlCreateButton("2", 40, 00, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 7) $button3 = GUICtrlCreateButton("3", 80, 00, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 22) $button4 = GUICtrlCreateButton("4", 120, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 23) $button5 = GUICtrlCreateButton("5", 160, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 32) $buttonclose = GUICtrlCreateButton("close", 200, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 28) GUISetState() _GUICreateInvRect($hGUI, 2, 62, 240, 100) ; Get main GUI position Local $aPos = WinGetPos($hGUI) $iX = $aPos[0] + 2 $iY = $aPos[1] + 62 ; Create child GUI $hGUI_child = GUICreate("", 240, 100, $iX, $iY, BitOR($WS_POPUP, $WS_BORDER), -1, WinGetHandle(AutoItWinGetTitle())) GUISetBkColor(0xFF0000, $hGUI_child) WinSetTrans($hGUI_child, "", 100) GUISetState() ;Register move event to keep child synchroed with main GUIRegisterMsg($WM_MOVE, "My_WM_MOVE") ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button1 ; Case $button2 ; Case $button3 ; Case $button4 ; Case $button5 ; Case $buttonclose ExitLoop Case Else EndSwitch If (BitAND(WinGetState($hGUI), 16) = 16) And (BitAND(WinGetState($hGUI), 16) <> 16) Then WinSetState($hGUI_child, "", @SW_MINIMIZE) ElseIf (BitAND(WinGetState($hGUI), 2) = 2) And (BitAND(WinGetState($hGUI), 16) - 16) Then WinSetState($hGUI_child, "", @SW_RESTORE) EndIf WEnd GUIDelete() EndFunc ;==>_Main Func My_WM_MOVE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam If $hWnd <> $hGUI Then Return Local $aPos = WinGetPos($hGUI) _WinAPI_SetWindowPos($hGUI_child, $hGUI, $aPos[0] + 2, $aPos[1] + 62, 240, 100, $SWP_NOACTIVATE) EndFunc ;==>My_WM_MOVE Func _GUICreateInvRect($hWnd, $iX, $iY, $iW, $iH) Local $hMask_1 = _WinAPI_CreateRectRgn(0, 0, @DesktopWidth, $iY) Local $hMask_2 = _WinAPI_CreateRectRgn(0, 0, $iX, @DesktopHeight) Local $hMask_3 = _WinAPI_CreateRectRgn($iX + $iW, 0, @DesktopWidth, @DesktopHeight) Local $hMask_4 = _WinAPI_CreateRectRgn(0, $iY + $iH, @DesktopWidth, @DesktopHeight) _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_2, 2) _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_3, 2) _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_4, 2) _WinAPI_DeleteObject($hMask_2) _WinAPI_DeleteObject($hMask_3) _WinAPI_DeleteObject($hMask_4) _WinAPI_SetWindowRgn($hWnd, $hMask_1, 1) EndFunc ;==>_GUICreateInvRect 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...
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