2010. május 7., péntek
Remove the popup menu from Flash's ActiveX
Problem/Question/Abstract:
I 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;
Feliratkozás:
Megjegyzések küldése (Atom)
Nincsenek megjegyzések:
Megjegyzés küldése