Jump to content

Window dock


janci
 Share

Recommended Posts

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

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
A decision is a powerful thing
Link to comment
Share on other sites

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

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

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

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
A decision is a powerful thing
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...