Mega Code Archive

 
Categories / Delphi / Activex OLE
 

Remove the popup menu from flashs activex

wanted to insert an Macromedia Flash intro into my program using the provided ActiveX, but I also wanted to remove the ugly Flash's popup menu. That's the way. And if it's not enought, you can replace it with your own popup menu! Answer: In your Form, where the Flash ActiveX is, place an "Application Events" component. Into the "OnMessage" Event put this code: procedure TfrmMain.AppEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin if (Msg.message = WM_RBUTTONDOWN) then Handled := True; end; //It's not enought? Do you want to put your own PopupMenu? There's the solution: procedure TfrmMain.AppEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin if (Msg.message = WM_RBUTTONDOWN) then begin popupmnuFlash.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y); Handled := True; end; end;