1. Kamendra Singh
  2. PowerBuilder
  3. Tuesday, 30 April 2024 06:00 AM UTC

Hi Everyone,

We recently upgraded from PowerBuilder 2021 to PowerBuilder 2022 R3, and we've encountered an issue with the message boxes. It seems that if a user receives a message box and navigates to another window before responding to it, the message box appears in the new window. This behavior was not observed with PB2021. Please refer to the attached document for a visual representation of the issue. Could you kindly assist us in resolving this matter? Thank you for your attention to this issue.

Best regards,

Kamendra

Attachments (1)
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 30 April 2024 13:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Kamendra -

Please clarify: In the image you attached, is the window that is displaying the Google home page another PB window in the  same EQAI application that is using the web browser control, or is it being displayed in an instance of the Chrome browser application?

The reason I ask is because I cannot replicate this issue when testing with a second application (I used Notepad++) in PB 2022 R3 Build 3356.

Does this occur when running from the PB IDE or when it is deployed as an application?

Is this application deployed as a PowerServer app?

Best regards, John

Comment
There are no comments made yet.
Kamendra Singh Accepted Answer Pending Moderation
  1. Tuesday, 30 April 2024 15:27 PM UTC
  2. PowerBuilder
  3. # 2

Hi John,

Thank you for your prompt response and for investigating the issue.

Here are the answers to your queries:

  • The Google homepage is indeed opened in an instance of the Chrome browser application. We did not initiate this from the PB application.
  • This issue persists across various windows, including Notepad++, Word, Excel, Outlook, etc.
  • It occurs both within the IDE and with deployed application.
  • Just to clarify, the application in question is not deployed as a PowerServer app.

Please let me know if you require any further information from my end to assist with resolving this issue.

Thank you once again for your attention to this matter.

Best regards,

Kamendra

Comment
  1. John Fauss
  2. Tuesday, 30 April 2024 15:43 PM UTC
Are you using the latest build of PB 2022 R3 (Build 3356)? Your original post does not mention this. If you are not using Build 3356, is it possible for you to try it?

Can you duplicate this behavior in a small, test app? I used a very small, single window test app with a command button that issues a MessageBox function call.

If you can produce a small test app that exhibits the problem behavior, I suggest you open a bug ticket and attach the zip'd pbl, target and workspace so that Appeon can investigate the problem:

https://www.appeon.com/standardsupport/newbug
  1. Helpful 2
There are no comments made yet.
Kamendra Singh Accepted Answer Pending Moderation
  1. Wednesday, 1 May 2024 06:41 AM UTC
  2. PowerBuilder
  3. # 3

Hi John,

Just a quick update: I'm currently using the latest build of PB 2022 R3 (Build 3356).

I've already opened a bug report with Appeon regarding this issue. However, I wanted to check if anyone else has encountered this issue and possibly found a workaround.

I've attached a test application for your reference. I've been able to reproduce the issue using this app as well.

Your insights or any suggestions would be greatly appreciated.

Thanks again for your assistance.

Best regards,

Kamendra

Attachments (1)
Comment
There are no comments made yet.
Marco Armbruster Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 13:57 PM UTC
  2. PowerBuilder
  3. # 4

The same over here.

if the messagebox is open I can open any other app on

the pc and the messagebox stays always on top of all windows.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 18:17 PM UTC
  2. PowerBuilder
  3. # 5

@Kamendra - What is the Bug/Ticket ID for the issue you created, because I cannot find anything resembling this issue when I do a Bug Search.

The PowerScript MessageBox function has always called the Windows API MessageBox function to display the message box. This issue appears to be that, for unknown reason, the PowerScript MessageBox function now call the API function with a setting that specifies that the message box be opened as System Modal. Prior to this, the API function was being called with a Application Modal setting.

This can be easily verified by calling the Windows API function directly from PB. Here is the external function declaration I used to test:

FUNCTION Long WindowsMessageBox ( &
   Longptr      hWnd, &
   String       lpText, &
   String       lpCaption, &
   UnsignedLong uType &
   ) LIBRARY "user32.dll" ALIAS FOR "MessageBoxW"

along with sample code to call the Windows API function from a command button on a window:

Constant UnsignedLong MB_OK = 0
Constant UnsignedLong MB_ICONINFORMATION = 64
Constant UnsignedLong MB_APPLMODAL = 0
Constant UnsignedLong MB_SYSTEMMODAL = 4096
Constant UnsignedLong MB_TASKMODAL = 8192

Longptr  lp_hwnd
ULong    lul_type

MessageBox("PowerScript MessageBox Test","Application Modal",Information!,OK!)

lp_hwnd = Handle(Parent)

lul_type = MB_APPLMODAL + MB_OK + MB_ICONINFORMATION
WindowsMessageBox(lp_hwnd,"Windows MessageBox API Test 1","Application Modal",lul_type)

lul_type = MB_SYSTEMMODAL + MB_OK + MB_ICONINFORMATION
WindowsMessageBox(lp_hwnd,"Windows MessageBox API Test 2","System Modal",lul_type)

lul_type = MB_TASKMODAL + MB_OK + MB_ICONINFORMATION
WindowsMessageBox(lp_hwnd,"Windows MessageBox API Test 3","Task Modal",lul_type)

Return 0

If you created a public bug ticket, please provide the ticket ID so that I can follow its progress, and if necessary, contribute my example code for the PB development team.

Best regards, John

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 11 June 2024 18:40 PM UTC
Hi John;

FYI: I can see everything in the Support ticket system and I do not see anything logged against the MesageBox command for this issue.

Regards .. Chris
  1. Helpful
  1. John Fauss
  2. Tuesday, 11 June 2024 18:43 PM UTC
Thank you, Chris. I will open one.
  1. Helpful
  1. John Fauss
  2. Tuesday, 11 June 2024 19:05 PM UTC
Public ticket ID 12152 has been opened.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 12 June 2024 12:42 PM UTC
  2. PowerBuilder
  3. # 6

There is an undocumented Windows API function MessageBoxTimeout which allows you to have a message automatically close after a specified length of time.

I have an example:

https://www.topwizprogramming.com/freecode_messagebox.html

 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 13 June 2024 15:11 PM UTC
  2. PowerBuilder
  3. # 7

To all -

Appeon has supplied a hot fix for PB 2022 R3 Build 3356 for this issue. I have tested it and verified that the Hot Fix corrects the problem.

The affected runtime DLL's are the 32-bit and 64-bit pbvm.dll files in the Runtime 22.2.0.3356 folder. I'm including below a link to my public Bug Ticket that contains the Hot Fix zip file. Please note and be aware that a Hot Fix is not a full regression-tested maintenance release (MR), so there is a risk involved in using it. If you elect to try the Hot Fix, make a backup copy of the original DLL's prior to overwriting them in the Runtime 22.2.0.3356 folder.

    https://www.appeon.com/standardsupport/search/view?id=12152

I have confidence that Appeon will be including this fix in a future MR, but I do not yet know when that will be.

Best regards, John

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 13 June 2024 17:34 PM UTC
Thanks John for your great help and being on top of all the details!
  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.