James Posted December 1, 2007 Share Posted December 1, 2007 Hi all, Anyway of making a transparent background but solid Icons, labels etc? I know Larrys Screen Text did this, but I don't know where it is.. Thanks, James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 2, 2007 Author Share Posted December 2, 2007 Dun dun dun. No one knows, fair enough, gives me something to experiment with. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JustinReno Posted December 2, 2007 Share Posted December 2, 2007 You could make a GUI tranparent and create other smaller GUIs with the icons/labels/buttons you want. Link to comment Share on other sites More sharing options...
James Posted December 2, 2007 Author Share Posted December 2, 2007 (edited) Tried that, but it looks untidy. Edited December 2, 2007 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JustinReno Posted December 2, 2007 Share Posted December 2, 2007 (edited) I don't see how it would look tidy either way or vice versa. Edited December 2, 2007 by JustinReno Link to comment Share on other sites More sharing options...
The Ape Posted December 2, 2007 Share Posted December 2, 2007 Is this it? Dll and bitmap needed (below) ; EXAMPLE SHOWING Bitmap to Region function ( BMP2RGN() ) ; ; int BMP2RGN("str","path to BMP", ; "int",red value, ; "int",green value, ; "int",blue value) ; ; The red, green, blue values should be the color of the pixel ; in the BMP that you DON't want to see. ; #include <GUIConstants.au3> $gui = GUICreate("",100,100,-1,-1, $WS_POPUP) GUICtrlCreatePic("larry.bmp",0,0,100,100) GUICtrlSetState(-1, $GUI_DISABLE) $Button = GUICtrlCreateButton("button", 15, 40, 70, 20) $a = DLLCall("BMP2RGN.dll","int","BMP2RGN", _ "str","larry.bmp", _ "int",0, _ "int",0, _ "int",0) SetWindowRgn($gui, $a[0]) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $Button Exit EndSelect WEnd Func SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc larry.bmp BMP2RGN.dll FixJaw.comTriad-Art.com Link to comment Share on other sites More sharing options...
James Posted December 2, 2007 Author Share Posted December 2, 2007 (edited) Thanks, I shall try that now.Edit: Brilliant, but how do I change the transparency level? Edited December 2, 2007 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
The Ape Posted December 2, 2007 Share Posted December 2, 2007 Thanks, I shall try that now.Edit: Brilliant, but how do I change the transparency level?I don't know if that's possible. Maybe something in the DLL. Ask Larry. FixJaw.comTriad-Art.com Link to comment Share on other sites More sharing options...
voldor Posted February 2, 2008 Share Posted February 2, 2008 (edited) Hello, i've got a problem here. on some machines the black part of the image is still displayed. and i got no errors from the DLLCall(...) but the handle to the region is equal to 0 ; EXAMPLE SHOWING Bitmap to Region function ( BMP2RGN() ) ; ; int BMP2RGN("str","path to BMP", ; "int",red value, ; "int",green value, ; "int",blue value) ; ; The red, green, blue values should be the color of the pixel ; in the BMP that you DON't want to see. ; #include <GUIConstants.au3> $gui = GUICreate("",100,100,-1,-1, $WS_POPUP) GUICtrlCreatePic("larry.bmp",0,0,100,100) GUICtrlSetState(-1, $GUI_DISABLE) $Button = GUICtrlCreateButton("button", 15, 40, 70, 20) $a = DLLCall("BMP2RGN.dll","int","BMP2RGN", _ "str","larry.bmp", _ "int",0, _ "int",0, _ "int",0) MsgBox(1,"Info","region handle = "&$a[0] ) SetWindowRgn($gui, $a[0]) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $Button Exit EndSelect WEnd Func SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc Any idea ? Edited February 2, 2008 by voldor 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