DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Other Variables in Grid definitions  (Read 8,348 times)

psyFungi

  • Participant
  • Joined in 2012
  • *
  • Posts: 1
Other Variables in Grid definitions
« on: April 09, 2012, 04:27 PM »
Hi,

Just found GridMove today and loving it!

I am using it because I have a new triple-monitor setup and I've got issues with Eyefinity being turned on/off and then Windows (7) Resolution and monitor layouts getting all confused.  So I've decided to just leave Eyefinity enabled all the time.

With Eyefinity enabled you effectively have only ONE monitor, so Win 7 Snap and Maximize doesn't work as desired, thus GridMove to the rescue.

I've got three 1920x1200 monitors combining to create a single 6044x1200 desktop (not 5760x1200 - there's additional width of 284 added for bezel compensation, which may be evenly split into two 142px strips, or it may be 141+143 - I can't tell)

The problem(s): The the [Monitor1Right] variable/element is 6044 not 1920.  None of the built-in variables know the true 1920 width of the physical display.  My grid definition is ending up with lots of "hard-coded" numbers like this:

Code: (text)
; Middle-full-screen
GridLeft      = 1920 + 141
GridRight    = 1920 + 141 + 1920

What I would like to do is define some variables up front:

Code: (text)
[MonitorWidth] = 1920
[BezelLeftWidth] = 141
[BezelRightWidth] = 143

Then all the grids would have nice formulas like this:

Code: (text)
; Middle-full-screen
GridLeft      = [MonitorWidth] + [BezelLeftWidth]
GridRight    = [MonitorWidth] + [BezelLeftWidth] + [MonitorWidth]

Does this make sense? 

I can go with hard coded numbers if needed, but the grid becomes locked to my particular installation and if I recalibrate the bezel compensation I need to search/replace "141" throughout the file rather than once in the variable definition.

I tried downloading the source code to see how GridMove works internally but the source code link is broken:
http://jgpaiva.dcmembers.com/CS/GridMove/GridMove.zip is 404.  (Also tried with a 7z extension.)

Once again, thanks for a fantastic utility.  Donation on its way!

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: Other Variables in Grid definitions
« Reply #1 on: April 09, 2012, 10:13 PM »
Hi psyFungi,

Unfortunately, those variables (MonitorWidth, monitorRealWidth and so on) are obtained directly from the language GridMove is programmed with, so they can't be modified.
At the time I implemented the grid parser, I tried to have variables for creating grids, it makes much sense, however I found it to too hard to do, especially without interfering with other variables of the program.

Thanks for the heads-up on the source code archive, it had to be removed due to some trouble with antiviruses (I was an idiot and left some .exe there). I have uploaded it again, should be OK now. As a bonus, you also get a more recent version of the code than the compiled one.

Original address: https://www.donationcoder.com/forum/index.php?topic=30600.0