janci Posted August 22, 2007 Share Posted August 22, 2007 Hello.., How can I dock the GUI to one side of screen (like TaskBar)?? Plz help Thanks Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 These may be of help. I think I have an idea too though#345063#160851 A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 This may be stupid and I'm getting an example script together to test my possibly stupid idea, but you could do the following: 1. Obtain the edges of your screen. 2. Then "move" the gui to the edge (obviously it's edges need to line up, but simple math can help here). A decision is a powerful thing Link to comment Share on other sites More sharing options...
janci Posted August 22, 2007 Author Share Posted August 22, 2007 Yes, I can do that.. but when I will only move the GUI there then it will cover/will be covered by other windows Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 Set the GUI on top A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 (edited) This is REALLY bad but it might give you ideas. (you'll need to take in account dragging from side to side and the systray and if something else is set to top) #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $ParentWinTitle="Dock to Screen edges" $ParentWin = GUICreate($ParentWinTitle, 160, @DesktopHeight, 0, 0) $Label1 = GUICtrlCreateLabel("Example GUI Docks to Screen", 4, 32, 149, 17, $SS_SUNKEN) WinSetOnTop($ParentWinTitle,'',1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch _KeepDocked() Sleep(10) WEnd Func _KeepDocked() WinMove($ParentWin,'',0,0) EndFunc I'm actually surprised that there isn't a UDF for docking GUIs to the Screen. Maybe that's just surprising to me. Edited August 22, 2007 by JohnBailey A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 Also, you can just test for where the mouse is and if it's near one of the edges while the left btn is down then move to the edge. A decision is a powerful thing Link to comment Share on other sites More sharing options...
janci Posted August 22, 2007 Author Share Posted August 22, 2007 It is not what I whant.. when I run your script, I cannot see icons,texts etc. on the left side(under GUI), but when I dock ICQ then icons will move left and windows will resize... Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 not entirely sure I understood what you just said, but the script wasn't what you wanted but possibly the foundations for what you want. You mention ICQ. Are you wanting to dock ICQ? Did you read what I wrote about the steps you might want to take from where the script I started? Maybe I wasn't clear on those things. If you run the script as it is, there will be all sorts of undesirable things. A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 You might want to take a look at the script in this App http://www.autoitscript.com/forum/index.php?showtopic=39050 A decision is a powerful thing Link to comment Share on other sites More sharing options...
janci Posted August 22, 2007 Author Share Posted August 22, 2007 I dont whant to dock ICQ, I whant dock my own GUI like ICQ. Yes I read what you did wrote Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 I think I understand what you're saying. If I get this right the method I suggest, makes the window be ontop but the other windows aren't "aware of it's position" If this is the case, I'd suggest using API of some kind. I looked on msdn a bit but couldn't find anything specific. I'm sorry I don't know how to do this. I'm surprised no one has come around and slapped me for my ineffective ideas. I don't know how to get the knowledge-ones on here to look at this issue. It's a good idea. I think the answer lies in API of somekind that is in windows. Programs can do this (as you obviously know). I just don't know how to do it. Sorry, I just thought I'd through my half-baked ideas out here to see if it inspired you toward something truly insightful. A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 oh and welcome to the forums A decision is a powerful thing Link to comment Share on other sites More sharing options...
janci Posted August 22, 2007 Author Share Posted August 22, 2007 Thanks Yes, one way is to resize and move windows.. but what about icons(on desktop)?! I was looking for a function in user32.dll wich can do that.. but no result.. Link to comment Share on other sites More sharing options...
JohnBailey Posted August 22, 2007 Share Posted August 22, 2007 Thanks Yes, one way is to resize and move windows.. but what about icons(on desktop)?!I was looking for a function in user32.dll wich can do that.. but no result..Actually if you can use whatever things like Folders in Windows Docked and GoogleDesktop, then you wouldn't have to move the windows or the icons because everything would automatically move for you. That's what I was attempting to explain with my giberish about APIs. A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 23, 2007 Share Posted August 23, 2007 (edited) If you don't mind, let me know what you find > I think this is really interesting, especially since it's not already a UDF. I'm willing to help build one with you. I'm not that knowledgeable, but I'm certainly determined in finding solutions Maybe that will help... Probably need a little guidance. I could ask one of my "mentors" ( ) on here if they'd give any advice. Edited August 23, 2007 by JohnBailey A decision is a powerful thing Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 23, 2007 Moderators Share Posted August 23, 2007 Something like: http://www.autoitscript.com/forum/index.php?showtopic=25790 ? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
JohnBailey Posted August 23, 2007 Share Posted August 23, 2007 YEAH!!! and that's AMAZING!!!! Actually, that will help me personally with something I was wanting to figure out anyway!! Goodness, thank you Smoke_N!! Hope that helps Janci too. Now time for some more "reverse engineering" way exciting :runs off excited like a mad scientist: A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 23, 2007 Share Posted August 23, 2007 You guys amaze and encourage me. Thanks Smoke_N A decision is a powerful thing Link to comment Share on other sites More sharing options...
janci Posted August 23, 2007 Author Share Posted August 23, 2007 (edited) Something like: http://www.autoitscript.com/forum/index.php?showtopic=25790 ?No, it isn´t that what I whant ... :-(I whant to do this:I whant to dock my GUI like google's Edited August 23, 2007 by janci 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