unit Unit_action;interface
uses
Windows, Messages, SysUtils, Classes,StdCtrls, Graphics, Controls, Forms, Dialogs,
ExtCtrls,registry,activex,comobj,shlobj; procedure exitabout(Sender: TObject);
procedure paintline(sender :TObject);
procedure Make_AboutBox(sender :Tcomponent);implementation
procedure exitabout(Sender: TObject);
var
currh:Thandle;
begin
currh:=GetForeGroundWindow();
SendMessage(currh,WM_Close,0,0);
end;
procedure paintline(sender :TObject);
var
p:TPoint;
begin
TForm(sender).Canvas.Pen.Color :=clwhite;
TForm(sender).Canvas.Pen.Width :=1;
p.x :=2;
p.y :=198;
TForm(sender).Canvas.PenPos:= p;
TForm(sender).Canvas.LineTo(TForm(sender).width-2,198);
TForm(sender).Canvas.Pen.Color :=$808080;
p.y :=199;
TForm(sender).Canvas.PenPos:= p;
TForm(sender).Canvas.LineTo(TForm(sender).width-2,199);
end;
procedure Make_AboutBox( sender :Tcomponent);
var
form_about:TForm;
label_info:TLabel;
button_ok:TButton;
image_icon:TImage; begin
form_about:=Tform.Create(sender) ;
label_info:=TLabel.Create(sender) ;
button_ok:=TButton.Create(sender) ;
image_icon:=TImage.Create(sender);
label_info.Parent:=form_about;
button_ok.Parent:=form_about;
button_ok.OnClick :=exitabout;
image_icon.Parent:=form_about;
form_about.Caption :='关于';
form_about.BorderStyle :=bsdialog;
form_about.Width :=400;
form_about.height:=300;
form_about.Position :=podesktopcenter;
form_about.Font.Name :='宋体';
form_about.Font.Size :=10;
form_about.OnPaint :=paintline;
image_icon.Picture.Icon.Handle :=Application.icon.handle;
label_info.WordWrap :=true;
label_info.Caption :='hhh';
label_info.Left :=147;
label_info.Top :=16;
label_info.Height :=174;
label_info.Width:=240;
image_icon.Left :=25;
image_icon.Top :=16;
button_ok.Left :=159;
button_ok.Top :=223;
button_ok.Caption :='确定';
form_about.Showmodal;
end;end.
uses
Windows, Messages, SysUtils, Classes,StdCtrls, Graphics, Controls, Forms, Dialogs,
ExtCtrls,registry,activex,comobj,shlobj; procedure exitabout(Sender: TObject);
procedure paintline(sender :TObject);
procedure Make_AboutBox(sender :Tcomponent);implementation
procedure exitabout(Sender: TObject);
var
currh:Thandle;
begin
currh:=GetForeGroundWindow();
SendMessage(currh,WM_Close,0,0);
end;
procedure paintline(sender :TObject);
var
p:TPoint;
begin
TForm(sender).Canvas.Pen.Color :=clwhite;
TForm(sender).Canvas.Pen.Width :=1;
p.x :=2;
p.y :=198;
TForm(sender).Canvas.PenPos:= p;
TForm(sender).Canvas.LineTo(TForm(sender).width-2,198);
TForm(sender).Canvas.Pen.Color :=$808080;
p.y :=199;
TForm(sender).Canvas.PenPos:= p;
TForm(sender).Canvas.LineTo(TForm(sender).width-2,199);
end;
procedure Make_AboutBox( sender :Tcomponent);
var
form_about:TForm;
label_info:TLabel;
button_ok:TButton;
image_icon:TImage; begin
form_about:=Tform.Create(sender) ;
label_info:=TLabel.Create(sender) ;
button_ok:=TButton.Create(sender) ;
image_icon:=TImage.Create(sender);
label_info.Parent:=form_about;
button_ok.Parent:=form_about;
button_ok.OnClick :=exitabout;
image_icon.Parent:=form_about;
form_about.Caption :='关于';
form_about.BorderStyle :=bsdialog;
form_about.Width :=400;
form_about.height:=300;
form_about.Position :=podesktopcenter;
form_about.Font.Name :='宋体';
form_about.Font.Size :=10;
form_about.OnPaint :=paintline;
image_icon.Picture.Icon.Handle :=Application.icon.handle;
label_info.WordWrap :=true;
label_info.Caption :='hhh';
label_info.Left :=147;
label_info.Top :=16;
label_info.Height :=174;
label_info.Width:=240;
image_icon.Left :=25;
image_icon.Top :=16;
button_ok.Left :=159;
button_ok.Top :=223;
button_ok.Caption :='确定';
form_about.Showmodal;
end;end.
解决方案 »
- 江湖救急,各老大有空看下,图片按钮问题
- 用bcp命令导出文件的问题
- 为什么我不能直接把JPG图片保存到数据库?GIF有如何保存呢?
- 请问各位,为什么clientSocket.active不能动态的改变啊?
- 50分求,怎么在Memo中加入垂直滚动条!?
- 关于MS Speech SDK5.1的问题
- 请问在Delphi中如何控制SQL Server 对指定的数据库进行备份和恢复!
- 高级控件开发技术,up2分,解决给剩下的!
- 一个关于 EPSON 300K(超市的小票打印效果,连续走纸) 的打印问题
- 一个关于怎样用ADSL Momden局域网上网的问题!
- Pascal 中怎样实现文件读写和创建文件??谢谢
- 特难的问题!高手请看!
有问题的是onclick和onpaint赋值