{
Jeder der mal TWebBrowser.SetFocus ausprobiert hat,
musste feststellen, dass der Fokus nicht auf das Webbrowser
Dokument (eine Webseite) setzt, sondern auf das Webbrowser Control,
was uns nicht gerade viel bringt.
Hier werden zwei Moglichkeiten beschrieben, wie man den Fokus auf
die "Webseite" (d.h Dokument des Webbrowser) setzen kann.
{
{
Anyone that has worked with TWebBrowser knows that the
TWebBrowser.SetFocus procedure doesn"t set focus on the "web page",
but rather on the control itself, which doesn"t do us a whole lot of good.
Here are two possibilities to set the focus on the "web page" (i.e., document):
}uses
ActiveX;
begin
WebBrowser1.Navigate("irgendeinedatei.html");
with WebBrowser1 doif Document <> nilthenwith Application as IOleobject do
DoVerb(OLEIVERB_UIACTIVATE, nil, WebBrowser1, 0, Handle,
GetClientRect);
end;
Если Вас заинтересовала или понравилась информация по разработке на Delph - "Передать фокус TWebBrowser", Вы можете поставить закладку в социальной сети или в своём блоге на данную страницу: Так же Вы можете задать вопрос по работе этого модуля или примера через форму обратной связи, в сообщение обязательно указывайте название или ссылку на статью!