怎样替换flash弹出菜单(100分)

  • 主题发起人 主题发起人 chinaboyli
  • 开始时间 开始时间
C

chinaboyli

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样替换flash弹出菜单
 
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, StdCtrls, OleCtrls, ShockwaveFlashObjects_TLB;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
ShockwaveFlash1: TShockwaveFlash;
procedure FormCreate(Sender: TObject);
private
procedure ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
{ 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_RBUTTONDOWN) and (windowfrompoint(Mouse.CursorPos)=ShockwaveFlash1.handle) then
begin
popupmenu1.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y);
Handled := True;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMessage:= form1.ApplicationEvents1Message;
end;

end.
 
后退
顶部