Skip to main content
Question

Calculate the actual position of a Wintegrate screen on the monitor

  • February 11, 2026
  • 4 replies
  • 33 views

Kevin Hond
Forum|alt.badge.img+1

I have a program that creates a Wintegrate pop-up window. Within this window, among other things, I place a picture in a specific location. Currently, the x/y coordinates used to place the picture are based solely on the window it’s self.

Problem: the picture seems to move around if I resize and/or move the window. Or worse, if I move the program to a different computer.

The solution that I am looking for, is a way to determine exactly what are the x/y coordinates of the upper/left corner of the window as compared to the full monitor screen. This would allow me to calculate exactly where I want to place the picture, within the window, no matter the size or location of said window on the monitor.

4 replies

Mike Young
Forum|alt.badge.img
  • Participating Frequently
  • February 11, 2026

I’m not sure what you mean by a wIntegrate pop-up except for a DialogBox but I would have thought moving this around would just maintain itself.

That being said, without specifics on what you are doing, have you looked at the Client Scripting WindowPos and SystemMetrics functions?


Kevin Hond
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • February 12, 2026

I guess I’m not being clear enough.

I am referring to the top and left (x/y) coordinates of a Wintegrate window. That is to say, the x/y coordinates of the screen’s current location as compared to the entire (monitor/terminal) , that is to say, the screen is located at x/y of the entire (monitor/terminal) e.g. the x/y is 20,30 as compared to the monitor screen even though the x/y of the Wintegrate window in actuality is still 1,1 no matter where you move it to. Those numbers should change if you reposition the Wintegrate window on the monitor. Knowing the new x/y coordinates would allow me to position (with a few simple calculations) exactly where the x/y coordinates should be located. Then, I could re-position my image within my Wintegrate window as required.

I hope this add more clarity. In simplest terms, I am looking for a way to identify the x/y coordinates of the top/left of the window within the entire monitor.


Mike Young
Forum|alt.badge.img
  • Participating Frequently
  • February 13, 2026

WindowPos can tell you where wIntegrate is and returns the rectangle position in pixels of inside terminal, outside terminal, inside session window or outside session window.  If you are doing this in databasic then you will need the wIntegrate Host subroutines and use something like WIN.EVAL

e.g.

CALL WIN.EVAL(“WindowPos(1)”, WINPOS) ;! 1=wIntegrate app position, 2 = inside session window

TOPLEFT_X = FIELD(WINPOS, “,”, 1)

TOPLEFT_Y = FIELD(WINPOS, “,”, 2)

BOTRIGHT_X = FIELD(WINPOS, “,”, 3)

BOTRIGHT_Y = FIELD(WINPOS, “,”, 4)

 


Kevin Hond
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • February 14, 2026

Mike, I can’t thank you enough. This is exactly what I was looking for.

P.S.

I was able to locate “some” documentation on the WIN.EVAL subroutine (in the winthost document) but it does not mention the full functionality of if this routine. Thanks again.