topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 9:30 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: drag window to edge automatically resizes it  (Read 730399 times)

ppass

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 87
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #400 on: December 11, 2007, 03:28 AM »
A small question on the "Fast Move" feature. I have a French external keyboard, so I have to hit SHIFT + number to get the numbers (eg. pressing on the "1" key gives "&" instead).

GridMove has default setting (modifier is # - Win key). When I hit Win+SHIFT+number, it works, but this is not so nice, I just want to hit Win + number. So I try directly using the numeric keypad on the right of my keyboard (I do not have to press SHIFT for this one, pressing "1" gives "1").

But the problem I have is that Win + numeric keypad does not work (GridMove does nothing). Is this a bug?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #401 on: December 11, 2007, 07:38 AM »
Rgb9001: What you're looking for is a bit different from what gridmove does. But i've seen a program that does exactly what you want.. Unfortunatelly, i can't recall its name now and thus am unnable to find it :(

ppass: I see the problem, i have updated a new version of gridmove that supports numpad introduction with the windows key.

ppass

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 87
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #402 on: December 11, 2007, 02:52 PM »
Great! How about the other suggestion (blacklisting some window types like VBA forms from being moved with GridMove)?

Rgb9001

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #403 on: December 11, 2007, 03:33 PM »
Rgb9001: What you're looking for is a bit different from what gridmove does. But i've seen a program that does exactly what you want.. Unfortunatelly, i can't recall its name now and thus am unnable to find it :(
If one already exists that would be excellent! Let me know if you think of the name.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #404 on: December 11, 2007, 03:40 PM »
Sorry, i forgot to answer about that.
I've been meaning to add exceptions for quite a while now, but it's always an enormous load of work.
BUT, there is already support for adding exceptions via .ini file, it just wasn't enabled.

Just redownload (and reinstall), and run once. A new ini key will be created: Exceptions.
That key holds the window classes of the windows that should be ignored. (to find those values, you can use for example window spy which is included with the instalation of Autohotkey).


PS: i'm sorry, i forgot to update the executable the last time i posted. This version already includes the change that the previous version was supposed to have

ppass

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 87
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #405 on: December 11, 2007, 10:22 PM »
Thanks, both points work like a charm in the new version.

Concerning the fastmove, may I suggest some improvements:

- instead of using "1", "2", ... keys, make it more intuitive with arrow keys.
Example: # +"up key" would move the window to the closest defined zone "above". For example, assuming that I use the default 2-part grid vertical template with a secondary screen on top of the primary, # +"up key" sends the window from section 1 to section 3.

If you find too difficult to physically locate grid zones relative to one an other, then could you implement a simple zone iteration. Example with window in zone1. # + "->" (right arrow) sends window to zone2 (equivalent to #+2), # + "->" pressed again sends to zone3, pressing # + "->" once more sends to zone4, etc. in a loop.

- add a second  modifyer key to span windows.
Example:  M + "->" key (M is the new modifier) would span the window horizontally.
I recall that you mention somewhere features to expand horizontally / vertically, but I do not know where to find them.

Anyway, thanks for such a nice program. I recall trying UltraMon a long time ago, but I think your program is much more fitted for normal use. The only feature I miss is the small arrow icon that UltraMon added in the title bar of windows. Pressing the "up" arrow would send the window to the above screen, etc.


jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #406 on: December 12, 2007, 05:15 AM »
Hey ppass.

About the suggestions regarding fastmove:
Currently, none of those are possible, simply because gridmove isn't aware of where the window is. I mean, it only moves the window to a grid, and doesn't keep track of which windows are in which grids. It's not impossible to implement your suggestions, only something i can't do right now.

About having the windows move to the other screen... You can make your own gird, which could have for example in monitor 1, an element that would move the window to monitor 2, and in mornitor 2 would have an element that would move to monitor 1.

ps: I have attached to this post, another version of axcrusik's grid, which allows you to, in conjuntion with being able to move windows with the numpad, move them in a way that makes more sense.
To install it, just add it to the "grids" folder of gridmove, and replace the earlier version.

Another interesting feature is that now you can add a modifier to reach for numbers higher than 10 faster. Check on the ini file, and set the key FastMoveMeta like this:
FastMoveMeta=\
That will allow you to move a window to area 11 by pressing win+\ followed by 1 (instead of 11 like when you press win+g).

ppass

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 87
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #407 on: December 12, 2007, 08:23 PM »
gridmove isn't aware of where the window is. I mean, it only moves the window to a grid, and doesn't keep track of which windows are in which grids.
That is fortunate, and obviously the most efficient way to program this.

It's not impossible to implement your suggestions, only something i can't do right now.

I understand that you can't do right now, maybe personal constraints. Anyway, finding the zone of the window should be quite straightforward. Here is my take on it:

Get the size of the active window (Top, Right, Bottom, Left)

Loop through all zones defined in the grid (start with zone1)

   If (Top == GridTop) and (Right == GridRight) and (Bottom == GridBottom) and (Left == GridLeft) then ZONE_FOUND ! ! ! get out of the loop
 
  else, go to next zone in the grid


Return to  beginning of loop


If you get-out of the loop without finding a zone, then move to zone1, else move the window to the next zone (pressed # + right arrow) or the previous zone (pressed # + left arrow) or the 1st zone (press # + down arrow) or the last zone (pressed # + up arrow).




ppass

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 87
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #408 on: December 12, 2007, 08:28 PM »
One question: is it possible to define one's own constants at the beginning of grid files? This would make grid manipulation more flexible

For example,

[Groups]

  NumberOfGroups = 20
  Top_ratio = 10%

[1]
  ...
  GridTop    = [Monitor1Top]  + Top_ratio * ([Monitor1Bottom]-[Monitor1Top])
...

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #409 on: December 13, 2007, 04:05 AM »
About detecting the window zones:
Unfortunatelly, many windows don't actually get the size they are moved to, thus, those would always be detected as not belonging to any zone and would always be moved to the first zone. Still, it should work for a fair amount of windows. I'll see if i can find time to implement this ;) (currently i'm on exams, and time is sparse :( )

About having constants.. Currently, that is something that would involve a big rewrite of the grid file reading, and i think that for the advantage it offers, there probably are more interesting features that should be added.
Maybe you could do it like this: write the file as if you had defined that constant, and use a text editor's replace to replace all of the occuorences with the value you'd like.

ppass

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 87
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #410 on: December 13, 2007, 07:59 PM »
My comment will be "focus on your exams", you can do that later when you have more time.

Unfortunatelly, many windows don't actually get the size they are moved to
Well, I have no clue how you are doing this, but I recently discovered Windows API functions. I played a bit with some of them in VBA, and this quite straight forward. I assume in your case you have to use the GetWindowRect Function
http://msdn2.microso...ibrary/ms633519.aspx

where the lpRect structure is something like this

Private Type lpRect
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Anyway, I am sure that you will find a way...

Good luck for your exams!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #411 on: December 15, 2007, 05:12 PM »
Just a little something for those that have an OS that supports better icons (or have a cool launchbar with gridmove in it :P)

I have attached to this post a 128x128 version of gridmove's icon! :D

Tyinsar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 35
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #412 on: December 15, 2007, 11:07 PM »
jgpaiva, Thanks! - this program of yours is truly awesome and is the cause for me registering here :beerchug:.

I have attached a grid file for TripleHead2Go users. (I also made and attached another for 2 TH2G in vertical span mode (2 screens high, 3 screens wide) :P)

Both files have intentional blank spots (in case you start dragging a window and change your mind). The TH2G.grid file also has two additional areas defined (in case someone wants more zones) but not active.

EDIT:
1) Unless you are using a TH2G with three monitors you don't need the TH2G.grid file.
2) The TH2Gx2.grid is only for six monitors in a 3w*2h spanned setup (seen as one LARGE monitor)

Edit2: Updated grids in grid thread: --> https://www.donation...dex.php?topic=9387.0
[GridMove Tutorial]
It's not about how Life treats you - It's about how You treat life.
« Last Edit: December 26, 2007, 09:59 PM by Tyinsar »

mitzevo

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 462
  • Control is power
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #413 on: December 16, 2007, 02:46 AM »
Can some body please make a Dual-Screen Reverse?

And is it possible to have a Dual-Screen & Dual-Screen Reverse loaded at the same time, that you can easily switch between by moving the mouser to certain zone?

The clock is running. Make the most of today. Time waits for no man. Yesterday is history. Tomorrow is a mystery. Today is a gift. That's why it is called the present.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #414 on: December 16, 2007, 04:21 AM »
what do you mean by dual-screen reverse, mitzevo?

Tyinsar: thanks a lot!! these are the kind of posts that keep me going ;)

I just tested your grids, and you must have a giant monitor! Some of the elements are so small in my monitor that when i move stuff there, the windows aren't resized to that size, but get a bit larger :P

mitzevo

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 462
  • Control is power
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #415 on: December 16, 2007, 05:52 AM »
there is "3 part grid" and "3 part grid reverse". I'm after a dual screen reverse  :)

Edit: np  :) I'll take a look when I get some time.
The clock is running. Make the most of today. Time waits for no man. Yesterday is history. Tomorrow is a mystery. Today is a gift. That's why it is called the present.
« Last Edit: December 16, 2007, 03:27 PM by mitzevo »

Tyinsar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 35
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #416 on: December 16, 2007, 02:30 PM »
Tyinsar: thanks a lot!! these are the kind of posts that keep me going ;)

I just tested your grids, and you must have a giant monitor! Some of the elements are so small in my monitor that when i move stuff there, the windows aren't resized to that size, but get a bit larger :P
Some day I may even have to get a PayPal account so I can donate here (I'm guessing that might mean even more heh heh)

The TripleHead2Go (link) allows 3 17" or 19" screens (1280x1024) to work as one monitor (total resolution=3840x1024). I'm using 2 of those in vertical span mode so my total resolution is 3840 x 2048 (6 19" screens).

LOL, I just tried my files on my 22" monitor - I see what you mean about small elements. Anyway, I don't expect many people will want the TH2Gx2.grid I'm using but the TH2G.grid should be great for those using a single TH2G with 3 19" monitors. (Matrox has some nice software for their TH2G but it's just nowhere near as flexible as yours)

@mitzevo: Have you tried creating your own grid? Look at some of the included ones. Make a copy. Modify that. It took me a bit to wrap my head around the idea but it's really easy once you get started.
[GridMove Tutorial]
It's not about how Life treats you - It's about how You treat life.
« Last Edit: December 16, 2007, 02:32 PM by Tyinsar »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #417 on: December 16, 2007, 03:09 PM »
3840 x 2048   :huh: :huh:
Now i understand why you find gridmove useful! :P

Pretty cool, Tyinsar!

@mitzevo: like Tyinsar said, it's pretty easy to make your own grid. I can't make the one you asked right now, but i'll give it a try later this week (if i can find the time :( )

Tyinsar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 35
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #418 on: December 26, 2007, 10:21 PM »
I hope you are having a great Christmas.

I was just looking at your section here and I would like to suggest that your Gridmove page should also have a link to your section of DC or, at the very least, to the grid thread (instead of only having the "Discuss Now" link that leads here).

GridMove is still The best software I've found for my setup (and for TH2G users) and I've been contemplating contacting Matrox & telling them to buy / bundle this with the TH2G.

Edit: Is there a GridMove grid-making tutorial? If not I'm thinking of making one.
[GridMove Tutorial]
It's not about how Life treats you - It's about how You treat life.
« Last Edit: December 27, 2007, 12:09 AM by Tyinsar »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #419 on: December 27, 2007, 06:27 AM »
Hey Tyinsar!
You're right, there should be a link for the grids thread. I'll add one ;)

About the matrox suggestion.. I don't think they'll go for it, but it sure doesn't hurt to try.. Thanks!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #420 on: December 27, 2007, 10:52 AM »
Edit: Is there a GridMove grid-making tutorial? If not I'm thinking of making one.

That would be very cool, Tyinsar!  :)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #421 on: December 27, 2007, 07:22 PM »
Edit: Is there a GridMove grid-making tutorial? If not I'm thinking of making one.
I somehow missed that part..
Nope, there's none. But it sure would be great to have one! (specially since the atempt at a gridmaker i made went very wrong)

Tyinsar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 35
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #422 on: December 28, 2007, 01:13 AM »
Tutorial started here: https://www.donation...ex.php?topic=11534.0

Please note that this is just a start but I thought I'd post what I had (so far) to get some feedback from you.
[GridMove Tutorial]
It's not about how Life treats you - It's about how You treat life.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #423 on: December 28, 2007, 04:09 PM »
You could try basing it on the window's style.
WinGet winStyle, Style, A
if (winStyle & 0x40000) { ;0x40000 = WS_SIZEBOX = WS_THICKFRAME
   ;code to resize
}
Looks like that works beautifuly!

I'll add it right away, as a "safe mode" ;)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: drag window to edge automatically resizes it
« Reply #424 on: December 28, 2007, 06:44 PM »
Ok, done.. And updated.
I also fixed another bug that could make the left drag method stop working after being used in a window that was one of the exceptions (like winamp). <- this ****** was bugging me for QUITE a while now.. I'm glad it's gone ;)