Sign in to follow this  
Followers 0

Window dock

36 posts in this topic

Posted

Hello..,

How can I dock the GUI to one side of screen (like TaskBar)??

Plz help

Thanks

Share this post


Link to post
Share on other sites



Posted

These may be of help. I think I have an idea too though

#345063

#160851

Share this post


Link to post
Share on other sites

Posted

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).

Share this post


Link to post
Share on other sites

Posted

Yes, I can do that.. but when I will only move the GUI there then it will cover/will be covered by other windows

Share this post


Link to post
Share on other sites

Posted

Set the GUI on top

Share this post


Link to post
Share on other sites

Posted (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 by JohnBailey

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

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...

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

I dont whant to dock ICQ, I whant dock my own GUI like ICQ.

Yes I read what you did wrote

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

oh and welcome to the forums :)

Share this post


Link to post
Share on other sites

Posted

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..

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted (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 by JohnBailey

Share this post


Link to post
Share on other sites

Posted

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:

Share this post


Link to post
Share on other sites

Posted

You guys amaze and encourage me. Thanks Smoke_N

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0