1. Mohammad Almasri
  2. PowerBuilder
  3. Sunday, 13 November 2022 10:53 AM UTC

How can I adjust my PowerBuilder application windows size to be fit with different screens resolutions, I built the application on my Pc with resolution and the windows size, and all content controls size seems fine but if installed it in other computing devices with different resolutions the windows size become Ver small or very large, need solution to adjust the application windows and contents size fit to the screen resolution.

Who is viewing this page
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 15 November 2022 03:38 AM UTC
  2. PowerBuilder
  3. # 1

Hi Mohammad, 


For the issue of adjusting the application windows and contents size to fit the screen resolution, have you tried to run the Examples Graph App Demo that comes with PB installation? Does it satisfy your requirements? 

The default location for the demo is in C:\Users\Public\Documents\Appeon\PowerBuilder 22.0\Code Examples\Example Graph App


I am uploading a small test case that automatically fits the application windows and contents size to the screen resolution. It is based on the eon_appeon_resize object from the Example Graph App Demo. You can test and verify if it helps to resolve your issue.




Attachments (1)
  1. Sivaprakash BKR
  2. Tuesday, 15 November 2022 06:44 AM UTC
Mark Lee,

Is this applicable for Powerbuilder too?
  1. Helpful
  1. Mark Lee @Appeon
  2. Tuesday, 15 November 2022 06:56 AM UTC
Yes, this is a pure PB demo.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 14 November 2022 05:21 AM UTC
  2. PowerBuilder
  3. # 2

Hi, Mohammad -

I believe what you are referring to is what is typically called "DPI Awareness", where the application makes adjustments based on the user's Dots-Per-Inch (DPI) setting.

PB applications are not DPI aware. Beginning in WIndows 8.1, I believe, Microsoft has made (and continues to make) "enhancements" to the Windows O/S to better handle different DPI settings with the stated goal of improving the user experience. In my opinion, these changes to the O/S have added considerable optional complexity to the way a Windows app handles the user interface. Microsoft has rolled out a series of changes across several releases of the O/S, which makes it more difficult to determine for a developer to determine what is possible and what has to change in order to be able to properly support DPI awareness. This is a complex topic.

There have been numerous questions posed and responses given here in the Appeon Q&A forum over the last couple of years. I suggest you perform a search using the "Search Q&A" field at the top of this (as well as every) post and search for the term "DPI". I did this prior to responding and the search returned 29 hits. Take some time to read the questions and responses to learn more about this topic.

I cannot speak for Appeon, but I believe the most recent word I recall seeing is that providing support for DPI awareness is not currently on the product roadmap.

Best regards, John

There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Monday, 14 November 2022 05:17 AM UTC
  2. PowerBuilder
  3. # 3


Another thread with similar requirement


When either window is resized or the resolution is changed, one has to re-position all controls in a window.   For that one need to write code.  Depending upon what one wants to re-position, he can choose a solution either with PFC or without PFC.  

Happiness Always
BKR Sivaprakash


There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.