1. Nguyen Xuan Huy
  2. PowerBuilder
  3. Monday, 15 March 2021 05:42 AM UTC

How to display on the second screen (screen for customer) on POS of retailed shop? The content is different from the main screen.

Thank you

John Fauss Accepted Answer Pending Moderation
  1. Monday, 15 March 2021 18:07 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Nguyen -

Your problem statement is very generic. Can you please provide a more detailed description of the issue(s) and maybe include a screen snapshot or two to illustrate? The Community tries to help everyone, but you first have to give us enough information to be able to understand the problem.

Regards, John

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 15 March 2021 18:43 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Nguyen -

  The way that I would attack this problem (assuming a dual monitor is being used) ...

1) Use the GetSystemMetrics() MS-Windows API

FUNCTION  Integer GetSystemMetrics ( Integer nIndex ) LIBRARY "USER32.dll"

2) Use the argument SM_CMONITORS (value 80)  to determine if 2 monitors are present

3) Use the argument SM_CXFULLSCREEN  (value 0) to determine current monitor's max width

4) Use the argument SM_CYFULLSCREEN  (17) to determine current monitor's max height

5) Compute an X value > step 3, Compute an Y value > step 4.

6) Open your PB window for monitor #2 (Visible = FALSE)

6) Move your PB window to the X,Y calculated in Step #5. Then make it visible.

FYI: As an example, here is what my framework does to open a Window on my monitor #2 ...

Controller_X=9993
Controller_Y=244
Controller_H=2896
Controller_W=5563

 

HTH     Regards... Chris

Comment
  1. Nguyen Xuan Huy
  2. Tuesday, 16 March 2021 01:37 AM UTC
Thank you so much!



Let's me try

Just one more question, Is it possible to let customer to response on the second screen ( Such as, they will key in their telephone number)



Best regard

Huy



  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 16 March 2021 01:53 AM UTC
Absolutely!
  1. Helpful
There are no comments made yet.
Nguyen Xuan Huy Accepted Answer Pending Moderation
  1. Tuesday, 16 March 2021 01:41 AM UTC
  2. PowerBuilder
  3. # 3

Hi John

The requirement is that I would like to use the second screen to get customer responses ( the customer will key in their telephone number). I'm not sure it is possible or not in term of programming in PB

Best regards

 

 

Comment
  1. John Fauss
  2. Tuesday, 16 March 2021 03:05 AM UTC
Yes, it is possible. Chris has given you some great tips. Just remember that Windows always returns values in pixels, not PowerBuilderUnits (PBU's), so you'll need to translate with the PixelsToUnits PowerScript function. You just need to position the X,Y coordinate of the window within the coordinate range of the second monitor. Good luck!
  1. Helpful
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.