下面程序如何
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, Menus;
type
TForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
PopupMenu1: TPopupMenu;
adasdf1: TMenuItem;
procedure PageControl1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.PageControl1Change(Sender: TObject);
var
cursorpos: Tpoint;
begin
getcursorpos(cursorpos);
PopupMenu1.Popup(cursorpos.X,cursorpos.Y);
end;
end.