Hi,
I have a tutorial and demo about using the ActiveX control in Delphi on: http://delphi.mozdev.org/
Unfortunately I don't have an answer to your problem. I tried using SetFocus in various places, including the OnDocumentComplete, OnDownloadComplete and OnNavigateComplete2 events. Examining the behaviour of my demo app carefully, switching to another app and then back or pressing tab twice restores focus to my TEdit. There are only two controls on my form that can take focus so it seems the TEdit has focus but isn't recieveing keyboard messages. Very strange.
Sorry I don't have a fix but maybe the extra info will help. Let me know if you come up with a solution.
Solution : I just modify the edtAddress.OnKeyDown event :
procedure TfrmMain.edtAddressKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var temp : OleVariant;
begin
if (Key = VK_RETURN) then begin
pnlBrowser.Enabled := false;
mzGecko.Navigate(WideString(edtAddress.Text), temp, temp, temp, temp);
end;
end;
And add this lines in then OnMouseMove form :
procedure TfrmMain.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if (not pnlBrowser.Enabled) and (not mzGecko.Busy) then pnlBrowser.Enabled := true;
end;
So the edtAddress dont lose the focus, and I can select some text in the Mozilla control (but I don't know how I can copy it :-/ )
-- Arnaud
Site : http://mesnews.no-ip.com Forum : news://news.zoo-logique.org/MesNews
_______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
