WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WinPlaceGet and WinPlaceSet Negative Values Issue

 Keywords:  WinPlaceGet  WinPlaceSet Negative Value Issue Problem WinPlace

Question:

I always thought that you could always take the result you get from WinPlaceGet() and feed it to WinPlaceSet() and get the desired result (i.e., the window put back in the position it was in when you did the WinPlaceGet()).

However, today, disillusionment set in. For the first time ever, I ran this in a multi-monitor setup. What I find is that WinPlaceGet() returns negative numbers for some of the coordinates; when I pass this to WinPlaceSet(), the negative numbers are "normalized" (as far as I can tell, this means adding 1000 to them to get them back in the positive range). The result, of course, is that the window gets placed on the primary monitor.

This is with WB 2006A. Is there a workaround?

Answer:

The behavior you describe is likely the result of a (slightly embarrassing) sign extension issue that was addressed in a late 2008 or early 2009 release.

WORKAROUND: Use 'WinPlace' instead.


Article ID:   W18463
Filename:   WinPlaceGet and WinPlaceSet Negative Values Issue.txt
File Created: 2010:10:20:09:25:50
Last Updated: 2010:10:20:09:25:50