帮我看一看这里错在那(屏蔽flash控件的右键菜单)? ( 积分: 50 )

  • 主题发起人 主题发起人 21816588
  • 开始时间 开始时间
2

21816588

Unregistered / Unconfirmed
GUEST, unregistred user!
这里错在那(我想使flash控件的右键菜单无效)?如何解决?
procedure TForm1.ApplicationEvents1ActionExecute(Action: TBasicAction;
var Handled: Boolean);
begin
if (Msg.message=WM_RBUTTONDOWN) and (msg.hwnd=shockwaveflash1.handle) then
begin
popupmenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
Handled:=True;
end;

end;
错误信息:
[Error] Unit1.pas(40): Object or class type required
[Error] Unit1.pas(40): Object or class type required
[Warning] Unit1.pas(40): Comparing signed and unsigned types - widened both operands
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
 
这里错在那(我想使flash控件的右键菜单无效)?如何解决?
procedure TForm1.ApplicationEvents1ActionExecute(Action: TBasicAction;
var Handled: Boolean);
begin
if (Msg.message=WM_RBUTTONDOWN) and (msg.hwnd=shockwaveflash1.handle) then
begin
popupmenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
Handled:=True;
end;

end;
错误信息:
[Error] Unit1.pas(40): Object or class type required
[Error] Unit1.pas(40): Object or class type required
[Warning] Unit1.pas(40): Comparing signed and unsigned types - widened both operands
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
 
把上述代码加到ApplicationEvents1.OnMessage事件中
 
后退
顶部