HanZ Posted June 15, 2008 Share Posted June 15, 2008 Hello, I want to show a button and a Graphic on my screen. There should be no GUI visible or better none should exist. So I wanted to ask if it is possible to realize this. Is there a controlID for the "desktop"? Also I want to have the Graphic always visible. For example if I have opened Firefox it should be visible for me. Is this realizable? I searched a long time in the AutoIt Help but wasn't sucessful. Greetings HanZ Link to comment Share on other sites More sharing options...
torels Posted June 15, 2008 Share Posted June 15, 2008 You Could make a transparent window that has the $WS_TOPMOT attribute that is jaust the size of the 2 controls contained in it 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 Link to comment Share on other sites More sharing options...
HanZ Posted June 15, 2008 Author Share Posted June 15, 2008 (edited) so in which context must I use this $WS_TOPMOT attribute? When i create the gui or where? I didn't find any information of $WS_TOPMOT in the AutoIt Help or did you mean $WS_EX_TOPMOST? Edited June 15, 2008 by HanZ Link to comment Share on other sites More sharing options...
d4rk Posted June 15, 2008 Share Posted June 15, 2008 i can't find $WS_TOPMOT in this document but i hope it's usefulhttp://www.autoitscript.com/autoit3/docs/a...x/GUIStyles.htm [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
torels Posted June 15, 2008 Share Posted June 15, 2008 (edited) so in which context must I use this $WS_TOPMOT attribute?When i create the gui or where?I didn't find any information of $WS_TOPMOT in the AutoIt Help or did you mean $WS_EX_TOPMOST?yesthat one... sorry ...anyway in the gui Edited June 15, 2008 by torels 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 Link to comment Share on other sites More sharing options...
rasim Posted June 15, 2008 Share Posted June 15, 2008 Hello, I want to show a button and a Graphic on my screen. There should be no GUI visible or better none should exist. So I wanted to ask if it is possible to realize this. Is there a controlID for the "desktop"? Also I want to have the Graphic always visible. For example if I have opened Firefox it should be visible for me. Is this realizable? I searched a long time in the AutoIt Help but wasn't sucessful. Greetings HanZNice example from Larry Dalooza: expandcollapse popup; 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> #include <WindowsConstants.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) EndFuncBackground.zip Link to comment Share on other sites More sharing options...
d4rk Posted June 15, 2008 Share Posted June 15, 2008 I see many great code come with a DLLCall, but how did you guys know about that ? i mean the function in DLL and usage ? i know about MSDN but is it the only way ? [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
HanZ Posted June 15, 2008 Author Share Posted June 15, 2008 Thanks to torels, rasim and d4rk Now i can work on Thank you very much Link to comment Share on other sites More sharing options...
torels Posted June 15, 2008 Share Posted June 15, 2008 #include <WindowsConstants.au3> GUICreate("Example",100,50,Default,Default,$WS_POPUP,$WS_EX_TRANSPARENT + $WS_EX_TOPMOST) GUICtrlCreateButton("Test Button",0,0,100,50) GUISetState() while 1 Switch GUIGetMsg() case -3 Exit EndSwitch WEnd here's an example 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 Link to comment Share on other sites More sharing options...
HanZ Posted June 15, 2008 Author Share Posted June 15, 2008 Thx torels your example seems to be also very useful but now I have another question I made a GUI with a image and a button and they are always on top ($WS_EX_TOPMOST) But if I have a activ window and click on the image I have the invisible GUI activated. Is there a possiblilty to deny this activation of the GUI? Link to comment Share on other sites More sharing options...
rasim Posted June 16, 2008 Share Posted June 16, 2008 HanZUse example example from Larry Dalooza, it`s little hard, but works fine and rightly Link to comment Share on other sites More sharing options...
HanZ Posted June 16, 2008 Author Share Posted June 16, 2008 I know that it works fine and rightly. That's why I used the code for my program but I have another problem with that code. The GUI is always on top ($WS_EX_TOPMOST) but if I click on a image on my invisible GUI i have activated the GUI. But I don't want to have it activated. The example of Larry Dalooza is just what my program is using. But I added a image on the invisible GUI. Clicking on that images activates the program so that it is activ. But I don't want to have the program activated by just clicking on the image. 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