Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Window dock


  • Please log in to reply
35 replies to this topic

#1 janci

janci

    Seeker

  • Active Members
  • 13 posts

Posted 22 August 2007 - 02:27 PM

Hello..,
How can I dock the GUI to one side of screen (like TaskBar)??
Plz help
Thanks







#2 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 03:03 PM

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

http://www.autoitscript.com/forum/index.ph...st&p=345063

http://www.autoitscript.com/forum/index.ph...st&p=160851
A decision is a powerful thing

#3 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 03:13 PM

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

#4 janci

janci

    Seeker

  • Active Members
  • 13 posts

Posted 22 August 2007 - 03:31 PM

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

#5 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 03:50 PM

Set the GUI on top
A decision is a powerful thing

#6 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 04:05 PM

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)
AutoIt         
#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, 22 August 2007 - 04:06 PM.

A decision is a powerful thing

#7 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 04:09 PM

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

#8 janci

janci

    Seeker

  • Active Members
  • 13 posts

Posted 22 August 2007 - 04:37 PM

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

#9 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 04:44 PM

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

#10 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 04:45 PM

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

#11 janci

janci

    Seeker

  • Active Members
  • 13 posts

Posted 22 August 2007 - 04:46 PM

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

Yes I read what you did wrote

#12 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 04:58 PM

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

#13 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 04:59 PM

oh and welcome to the forums :)
A decision is a powerful thing

#14 janci

janci

    Seeker

  • Active Members
  • 13 posts

Posted 22 August 2007 - 05:12 PM

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

#15 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 22 August 2007 - 06:59 PM

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

#16 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 23 August 2007 - 03:34 PM

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, 23 August 2007 - 03:35 PM.

A decision is a powerful thing

#17 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 23 August 2007 - 03:51 PM

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.


#18 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 23 August 2007 - 04:00 PM

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

#19 JohnBailey

JohnBailey

    Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 943 posts

Posted 23 August 2007 - 04:13 PM

You guys amaze and encourage me. Thanks Smoke_N
A decision is a powerful thing

#20 janci

janci

    Seeker

  • Active Members
  • 13 posts

Posted 23 August 2007 - 06:25 PM

Something like: http://www.autoitscript.com/forum/index.php?showtopic=25790 ?


No, it isnĀ“t that what I whant ... :-(

I whant to do this:
Posted Image

I whant to dock my GUI like google's

Edited by janci, 23 August 2007 - 06:38 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users