好!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ToolWin, Menus, StdCtrls,Math;
type
TForm1 = class(TForm)
ToolBar1: TToolBar;
ToolButton2: TToolButton;
PopupMenu1: TPopupMenu;
a1: TMenuItem;
procedure a1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.a1Click(Sender: TObject);
begin
form2.show;
end;
end.
form:
object Form1: TForm1
Left = 186
Top = 110
Width = 696
Height = 484
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 688
Height = 29
ButtonHeight = 31
Caption = 'ToolBar1'
TabOrder = 0
object ToolButton2: TToolButton
Left = 0
Top = 2
Caption = 'a'
MenuItem = a1
Style = tbsDropDown
end
end
object PopupMenu1: TPopupMenu
Left = 128
Top = 32
object a1: TMenuItem
Caption = 'a'
OnClick = a1Click
end
end
end
form2只是一个空form什么也没有