【delphi开源代码栏目提醒】:网学会员delphi开源代码为您提供BaseBrowser_Form_U.pas参考,解决您在BaseBrowser_Form_U.pas学习中工作中的难题,参考学习。
{
unit name : BaseBrowser_Form_U
Author : 李涛
Create date: 2004-01-19 08:15:23
description: Delphi模版管理系统基础编辑模版.
}
unit BaseBrowser_Form_U;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Buttons, Public_Unit_U, Mask, ComCtrls;
type
TBaseBrowser_Form = class(TForm)
PanelTop: TPanel;
Panel_ICO: TPanel;
Fun_ICO: TImage;
PanelTopText: TPanel;
PanelBottom: TPanel;
Panel2: TPanel;
App_ICO: TImage;
PanelBottomText: TPanel;
ADD_Bit: TBitBtn;
Cancel_Bit: TBitBtn;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Cancel_BitClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BaseBrowser_Form: TBaseBrowser_Form;
implementation
{$R *.dfm}
procedure TBaseBrowser_Form.FormShow(Sender: TObject);
var
R,G,B: Integer;
begin
R:=StrToInt(Copy(MySelf.PancelColor,0,3));
G:=StrToInt(Copy(MySelf.PancelColor,4,3));
B:=StrToInt(Copy(MySelf.PancelColor,7,3));
//设置颜色
//--------top--------------------------------------------------------------
PanelTop.Color:=RGB(R,G,B);
PanelTopText.Color:=PanelTop.Color;
Panel_ICO.Color:=PanelTop.Color;
//使用功能的ICO
Fun_Form.Icon:=TIcon.Create;
try
if FileEx(MySelf.SourcePath+Fun_Form.Caption+'.ICO') then
Fun_Form.Icon.LoadFromFile(MySelf.SourcePath+Fun_Form.Caption+'.ICO');
Fun_ICO.Picture.Icon:=Fun_Form.ICON;
finally
Fun_Form.Icon.Free;
Fun_Form.Icon:=nil;
end;
//--------Bottom-----------------------------------------------------------
App_ICO.Picture.Icon:=MySelf.Icon;
PanelBottom.Color:=PanelTop.Color;
PanelBottomText.Color:=PanelTop.Color;
//--------载入当前功能窗体信息---------------------------------------------
Self.Caption:='['+Fun_Form.Caption+']';
PanelTopText.Caption:='['+Fun_Form.Caption+'] ';
end;
procedure TBaseBrowser_Form.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=caFree;
end;
procedure TBaseBrowser_Form.Cancel_BitClick(Sender: TObject);
begin
Close;
end;
procedure TBaseBrowser_Form.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then PerForm(WM_NextDlgctl,0,0);
end;
end.
上一篇:
BaseBindings.pas
下一篇:
上市公司会计信息披露中印象管理行为研究(上)