1. Vinicius Geraldino
  2. PowerBuilder
  3. Monday, 11 September 2023 14:53 PM UTC

PB Version 2021 build 1509


I have a question, I have a screen (window + webbrowser control fullscreen).

When I open the window, I load an HTML page (it could be google.com), but it doesn't have focus (specifically in an input field)

If I open in chrome or other webbrowser the page focus on input normally.

I tried this code on active event of window but without success:

if Send(Handle(this), 513, 0, Handle(wb_1)) <> -1 then
Send(Handle(this), 514, 0, Handle(wb_1))
end if

513, 514 its a mouse click in decimal

tried too wb_1.setfocus(), window.setfocus()
Accepted Answer
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 September 2023 00:43 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Vinicius,

This issue had been fixed in PB 2022 R2 GA version, which replaces CEF with the more stable and powerful WebView2 for WebBrowser control. You can get the installer from our Downloads portal at https://account.appeon.com/download (login required).

Then you can find the general introduction to WebBrowser(WebView2) in PowerBuilder help > What's new > PowerBuilder 2022 R2 > WebBrowser engine upgrade chapter.


There are no comments made yet.
Vinicius Geraldino Accepted Answer Pending Moderation
  1. Friday, 26 April 2024 18:18 PM UTC
  2. PowerBuilder
  3. # 1

Hello Kai Zhao, today i have upgrade my application (2022 R3), and make a new test, unsuccessfully...

wb_1.setFocus() continue not seting focus.




  1. Kai Zhao @Appeon
  2. Sunday, 28 April 2024 00:58 AM UTC
This is probably because the web page has not finished loading yet. Please move the following code to the navigationcompleted event of WebBrowser control.

  1. Helpful 1
  1. Vinicius Geraldino
  2. Monday, 29 April 2024 11:33 AM UTC
It worked fine. Thanks a lot!!!
  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.