
Kolay Gelsin...
Kod: Tümünü seç
Unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, ShockwaveFlashObjects_TLB, StdCtrls, Menus;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
asdasd1: TMenuItem;
asdasd2: TMenuItem;
Label1: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure asdasd1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TSPFlas = Class(TShockwaveFlash)
public
procedure aloooo(var Message:Tmessage); message WM_RButtonDown;
end;
var
Form1: TForm1;
spflash :TSPFlas;
implementation
{$R *.dfm}
{ TSPFlas }
procedure TSPFlas.aloooo(var Message: Tmessage);
var
a:Tpoint;
begin
//spflash.PopupMenu := Form1.PopupMenu1;
Form1.PopupMenu1.Popup(mouse.CursorPos.X,mouse.CursorPos.y);
//exit;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
spflash := TSPFlas.create(Self);
spflash.Parent := Form1;
spflash.Width := 192;
spflash.Height := 192;
spflash.Left := 8;
spflash.Top := 8;
spflash.WMode := 'Window';
//spflash.Align := alClient;
spflash.Movie := 'c:\windows\desktop\flash\irak.swf';
end;
procedure TForm1.FormResize(Sender: TObject);
begin
//spflash.Align := alClient;
end;
procedure TForm1.asdasd1Click(Sender: TObject);
begin
ShowMessage('merhaba!');
end;
end.
peki flash objesi aktifken kullanıcı klavyeden yazıcı düğmesine basarsa ?object Form1: TForm1
Left = 193
Top = 133
Width = 228
Height = 254
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
KeyPreview = True
OldCreateOrder = False
OnCreate = FormCreate
OnResize = FormResize
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 16
Top = 208
Width = 186
Height = 13
Caption = 'flash çalışma zamanında oluşturulacak..'
end
object PopupMenu1: TPopupMenu
Left = 224
Top = 24
object asdasd1: TMenuItem
Caption = 'asdasd'
OnClick = asdasd1Click
end
object asdasd2: TMenuItem
Caption = 'asdasd'
end
end
end
Google gruplarında yazdı:All messages from thread
Message 1 in thread
From: Sean (McseC@Consultant.com)
Subject: flash control - disable right click
View this article only
Newsgroups: borland.public.delphi.vcl.components.using
Date: 2002-04-11 10:41:25 PST
Hi,
I need to disable the right click on a flash control in my app and show my
own popup menu, I saw help for this somewhere - just can't remember ...
ciao,
S
Message 2 in thread
From: André Werlang (beppe@terra.com.br)
Subject: Re: flash control - disable right click
View this article only
Newsgroups: borland.public.delphi.vcl.components.using
Date: 2002-04-11 21:26:09 PST
Handle the OnContextPopup event. D5 or later.
André Werlang.
Message 3 in thread
From: Sean (McseC@Consultant.com)
Subject: Re: flash control - disable right click
View this article only
Newsgroups: borland.public.delphi.vcl.components.using
Date: 2002-04-12 09:58:37 PST
> Handle the OnContextPopup event. D5 or later.
there isn't one ....
ciao,
Sean
Message 4 in thread
From: Peter Below (TeamB) (100113.1101@compuXXserve.com)
Subject: Re: flash control - disable right click
View this article only
Newsgroups: borland.public.delphi.vcl.components.using
Date: 2002-04-13 05:22:02 PST
In article <3cb71115_2@dnews>, Sean wrote:
> > Handle the OnContextPopup event. D5 or later.
>
> there isn't one ....
Test whether the host control of the activeX control receives a
WM_CONTEXTMENU message when you right-click on the acticeX control.
If it does the hosts OnContextPopup event should fire and you may be
able to mark the click as handled there.
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
Kod: Tümünü seç
procedure WM_CONTEXTMENU(var Message: TMessage); message WM_CONTEXTMENU;
Kod: Tümünü seç
procedure TFrmMain.WM_CONTEXTMENU(var Message: TMessage);
begin
ShowMessage(IntToStr(Message.Msg));
end;
Kod: Tümünü seç
Message.Msg:=0;
Kod: Tümünü seç
Unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, ShockwaveFlashObjects_TLB, StdCtrls, Menus;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
asdasd1: TMenuItem;
procedure asdasd1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TSPFlas = Class(TShockwaveFlash)
public
procedure aloooo(var Message:Tmessage); message WM_RButtonDown;
end;
var
Form1: TForm1;
spflash :TSPFlas;
implementation
{$R *.dfm}
{ TSPFlas }
procedure TSPFlas.aloooo(var Message: Tmessage);
var
a:Tpoint;
begin
Form1.PopupMenu1.Popup(mouse.CursorPos.X,mouse.CursorPos.y);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
spflash := TSPFlas.create(Self);
spflash.Parent := Form1;
spflash.WMode := 'Window';
spflash.Movie := 'c:\windows\desktop\flash\irak.swf';
end;
procedure TForm1.asdasd1Click(Sender: TObject);
begin
ShowMessage('merhaba!');
end;
end.