Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi - TWebBrowser issues

Tags:

delphi

Two quick questions

  1. How do I set focus to a TWebBrowser? This is so the mouse wheel scrolls the display without having to click within the TWebBrwoser display area first. It has a setfocus method that does nothing (or seems to do nothing).

  2. Within a TWebBrowser, right click a displayed link and select properties. The OK and Cancel buttons are disabled and you cannot close the dialog. You need to end task your app to kill it.

Any ideas?

Thanks, Jason.


1 Answers

Answer for Question 1 after much web hunting....

 with WebBrowser1 do
 if Document <> nil then
 with Application as IOleobject do
 DoVerb(OLEIVERB_UIACTIVATE, nil, WebBrowser1, 0, Handle, GetClientRect);

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!