Just as a matter of interest, I have got around the enter button problem
with a message handler...
WM_KEYUP:
begin
if Msg.wParam = 13 then
begin
Handled := True ;
// Post an {ALT-013} key combination message
PostMessage(Msg.hwnd, 258, 13, -1070071807) ;
end ;
end ;
This seems to work fine, and cause no other problems.
Dave.
-----Original Message-----
From: Dave [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 30 November 2000 10:29 p.m.
To: Multiple recipients of list delphi
Subject: Re: [DUG]: TWebBrowser
OK...
Does anyone have any idea how to get _Any_ navigation keys working in
TWebBrowser component? (especially enter).
Dave.
----- Original Message -----
From: David O'Brien <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, November 29, 2000 12:14 PM
Subject: [DUG]: TWebBrowser
> Same old problem with keys not happening.
>
> I am trying to use some code found on a previous thread, but having
> problems.
> The actual problem with the browser control is that the enter key does not
> work in a multi-line textarea.
>
> Is this the correct way to get all keys working in the control, or is
there
> a better way?
>
> Cheers,
> Dave.
>
> HTML: TWebBrowser ;
>
> procedure TBrowseForm.AppMessage(var Msg: TMsg; var Handled: Boolean);
>
> var
> iOIPAO: IOleInPlaceActiveObject;
> Dispatch: IDispatch;
>
> begin
> { exit if we don't get back a webbrowser object }
> if HTML = nil then
> begin
> Handled := False;
> Exit;
> end;
>
> Handled:=(IsDialogMessage(HTML.Handle, Msg) = True);
>
> if (Handled) and (not HTML.Busy) then
> begin
> if FOleInPlaceActiveObject = nil then
> begin
> Dispatch := HTML.Application;
> !!![Error] WebBrowser.pas(145): Incompatible types: 'OLE2.IDispatch' and
> 'System.IDispatch'
> if Dispatch <> nil then
> begin
> Dispatch.QueryInterface(IOleInPlaceActiveObject, iOIPAO);
> !!![Error] WebBrowser.pas(148): Incompatible types: 'TGUID' and 'Class
> reference'
> if iOIPAO <> nil then
> FOleInPlaceActiveObject := iOIPAO;
> end;
> end;
>
> if FOleInPlaceActiveObject <> nil then
> if ((Msg.message = WM_KEYDOWN) or (Msg.message = WM_KEYUP)) and
> ((Msg.wParam = VK_BACK) or (Msg.wParam = VK_LEFT) or
> (Msg.wParam = VK_RIGHT)) then
> file://nothing - do not pass on Backspace, Left or Right arrows
> else
> FOleInPlaceActiveObject.TranslateAccelerator(Msg);
> end;
> end ;
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"