【例子介绍】
【相关图片】
【源码结构】
unit Unit1; //Download by http://www.codefans.net interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, Buttons, StdCtrls,shellapi; type TForm1 = class(TForm) Image1: TImage; ComboBox1: TComboBox; SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton; Timer1: TTimer; procedure SpeedButton2Click(Sender: TObject); procedure SpeedButton1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Image1Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.SpeedButton2Click(Sender: TObject); begin self.Close; end; procedure TForm1.SpeedButton1Click(Sender: TObject); begin ShellExecute(handle,'open',pchar(Combobox1.Text),nil,nil,SW_show); end; procedure TForm1.FormCreate(Sender: TObject); begin self.Left:= 200; self.Top :=-30; end; procedure TForm1.Image1Click(Sender: TObject); begin self.Top:=10 end; procedure TForm1.Timer1Timer(Sender: TObject); begin if self.Active=False then self.Top:=-30; end; end.
评论