ÎÒ¸Õ¸Õ¿ªÊ¼Ñ§Ï°delphi
°´ÕÕ½ÌѧϰʱÕÕ×Å×öÁ˸ö ¶¯Ì¬´´½¨²Ëµ¥Àý×Ó
¿ÉÊÇÔËÐеÄʱºò³öÏÖ unable to create process£º¾Ü¾ø·ÃÎÊ¡£
ÕâÊÇÔõô»ØÊ£¿£¿
ÎÒÔËÐбðµÄ³ÌÐò¶¼Ã»ÎÊÌâ
Ö»ÓÐÕâ¸öÊÇÕâÑù
¶øÇÒÈðÐÇ»¹°ÑËûµ±×öÁ˲¡¶¾
´ó¼Ò°ïÏÂ
´úÂëÈçÏ£º
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
file1: TMenuItem;
procedure FormCreate(Sender:TObject);
private
procedure MothClick(Sender:TObject);
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
PullDownOutput:TMenuItem;
Item:TMenuItem;
i:integer;
SelfPosition:integer;
begin
PullDownOutput:=TMenuItem.Create(self);
PullDownOutput.Caption:='Ô·Ý';
SelfPosition:=MainMenu1.Items.IndexOf(file1);
MainMenu1.Items.Insert(SelfPosition+1,PullDownOutput);
for i:=1 to 12 do
begin
Item:=TMenuItem.Create(self);
Item.Caption:=IntToStr(i)+'Ô·Ý';
Item.GroupIndex:=1;
Item.RadioItem:=true;
Item.onClick:=MothClick;
PullDownOutput.Insert(PullDownOutput.Count,Item);
end;