1. Tim Ford
  2. PowerBuilder
  3. Wednesday, 1 May 2024 21:11 PM UTC

Is there anyway to suppress the "WebView runtime not installed" message when opening a window that has the WebBrowser control on it and the WebView2 Runtime does not exist? 

We are currently transitioning from using old OLE controls for URL functions to the new WebBrowser control. However, we want to be able to support both options in our next release by incorporating both the old OLE control as well as the new WebBrowser control on the same window. The code is setup to check the registry to determine if the WebView2 Runtime has been installed, and if so, make the WebBrowser control both visible and enabled and proceed down that path. However, if the WebView2 Runtime is not found in the registry, then the code will leave the WebBrowser control as disabled and invisible, and will then continue to use the old OLE objects. The problem we are running into is that even with the WebBrowser control disabled and invisible, as soon as a window that has the WebBrowser control on it is instantiated, if the WebView2 Runtime is not found, a popup message is displayed to the user stating "WebView Runtime not installed". Since we are performing our own check, and not using the WebBrowser control if the WebView2 Runtime is not found, we would like to be able to suppress this popup message.

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 2 May 2024 01:44 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Tim;

  For suppressing this behaviour, I would suggest using the OoenUserObject() command. That way, the new WB control is not instantiated until needed - thus, no msg.  HTH 

Regards ... Chris 

Comment
There are no comments made yet.
Tim Ford Accepted Answer Pending Moderation
  1. Thursday, 2 May 2024 14:27 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Chris for reminding me of the OpenUserObject() method. That is exactly what I needed to do, and I really should have thought of that myself!

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 2 May 2024 14:38 PM UTC
Hi Tim .. you are most welcome. Glad that this approach would solve your issue.

No problem with the suggestions, that's what this forum is for! ;-)

I only thought of this ahead of you because I probably had more coffee at that time of the day - LOL!
  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.