如何判断鼠标点了WebBrowser ( 积分: 100 )

  • 主题发起人 主题发起人 ocean7
  • 开始时间 开始时间
O

ocean7

Unregistered / Unconfirmed
GUEST, unregistred user!
如何判断鼠标点了WebBrowser
 
如何判断鼠标点了WebBrowser
 
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AppEvnts, OleCtrls, SHDocVw;

type
TForm1 = class(TForm)
WebBrowser1: TWebBrowser;
ApplicationEvents1: TApplicationEvents;
procedure ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if (msg.message=WM_LBUTTONDOWN) and (msg.hwnd=webbrowser1.Handle) then
begin
showmessage('click');
end;
end;

end.
 
后退
顶部