Bug 4999

Opening response window in second monitor 03 August, 2020

Guilherme Olivera
29 July, 2020
Product: PowerBuilder Category: Controls & UI
Version: 2019 R2 Build:
Classification: Sybase (legacy) bug Publishing: Public
Priority: P3
Status: Scheduling Reason:
Guilherme Olivera 03 August, 2020
Thanks Mark

I will check this code in my project

Mark Lee @Appeon 03 August, 2020
Hi Guilherme,

Thanks for reporting this problem.
We can reproduce it on our side and will do further research to figure it out.
We will keep you updated!
BTW, we found that PB 12.6 has the same behavior as well.
You can temporarily add the following code in open event in your response windows to work it around:

environment le_main
integer                  li_return 
long                                       ll_width, ll_heiht
li_return = GetEnvironment(le_main)
ll_width = PixelsToUnits( le_main.screenwidth, XPixelsToUnits!) / 2 + this.width / 2    //The second monitor is in the left side.
ll_heiht = PixelsToUnits( le_main.screenheight, YPixelsToUnits!)   / 2  - this.height / 2
this.function post move(-ll_width,ll_heiht)

Mark Lee
Guilherme Olivera 31 July, 2020
Thanks for your help Armando

I already downloaded this application, but it didn't seem to be something that works with different monitors positioned in different situations, something more practical is needed.

Do you have any code examples maybe from the engineers?
armando herrera @Appeon 31 July, 2020
Hi Guilherme, 

Yes, of course! 

Tutorial on Building an MDI Application: 

You can see this being done in the OrderEntry example App (that uses the STD Framework), that utilizes this approach. 

Please let us know your results! 

Guilherme Olivera 31 July, 2020
Could you give an example how i can do this?
armando herrera @Appeon 31 July, 2020
Hi Guilherme,

Thank you very much for the video.

This issue has been reported and marked as a Bug as a workaround and I'm transferring this case to the Engineering Team for their evaluation. 

You can control your own Response & Pop-Up windows to center on your App's main control window - like an MDI Frame.

Guilherme Olivera 29 July, 2020
General.mp4 (6737KB)

Here the video!,
Govinda Lopez @Appeon 29 July, 2020
Hi Guilherme,

Can you provide us with that simple video so we can further analyze this?

armando herrera @Appeon 29 July, 2020
Hi Guilherme, 

Thank you very much for your report. We are working on it and we will get back to you after analyzing it.

We'll keep you posted here!

Guilherme Olivera 29 July, 2020
Sorry, but my question is, how i can fix this and open a second window in the same monitor
Guilherme Olivera 29 July, 2020
response.PNG (2846KB)

*Phenomenon: Opening a response window in second monitor

*Reproduce Steps: 

1 - Create a project with a 2 windows,  
1.1 - The first window with a button that open a second window by response
1.2 - The second window with response mode
2- The project open the first window (not response)
3-  Run the project
4-  Drag the first window to secondary monitor
5-  Click in the button to open the second window
6- Check the window was opened in the primary monitor  

i cant make a movie with two monitors, but i can invite the project to check
Database Type:
Database Version: