《编程大师DELPHI6编程实例精选》(电脑报大师系列)一书的配套光盘中,有一该光盘的制作程序,用DELPHI6打开时出现“Class TVSS not found”和“Class TcontrolCreator not found”两个提示,在uses中有“vss 和 ControlCreator”
请专家判别这是什么控件,谢谢。
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,vss, ControlCreator, ExtCtrls, AppEvnts, vbersoft, ShellAPI;
请专家判别这是什么控件,谢谢。
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,vss, ControlCreator, ExtCtrls, AppEvnts, vbersoft, ShellAPI;
.pas的内容如下:
unit Main_Unit;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
vss, ControlCreator, ExtCtrls, AppEvnts, vbersoft, ShellAPI;type
TTopic = (ttNone, ttSoft, ttVCL);
type
TfrmMain = class(TForm)
myVss: TVSS;
Ctrl: TControlCreator;
tm_Load: TTimer;
ApplicationEvents1: TApplicationEvents;
procedure tm_LoadTimer(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ApplicationEvents1Deactivate(Sender: TObject);
procedure ApplicationEvents1Activate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure myVssBtnClick(Sender: TObject; szCmdLine: String;
HeadCmd: Char);
procedure CtrlTreeViewOnClick(Sender: TObject; FilePathName: String);
procedure CtrlTreeViewOnKeyUp(Sender: TObject);
private
procedure WMEraseBkgnd(var Msg: TWMEraseBkgnd);message WM_ERASEBKGND;
procedure RunFile(FileName: String);
procedure ChangeWindow(bgPic,HoverPic,Brf: String);
procedure FillCtrlRect(nLeft,nTop,nWidth,nHeight: Integer);
function StandardCommand(sCmd: String): Boolean;
public
{ Public declarations }
end;var
frmMain: TfrmMain;
bJustShow: Boolean;
AppPath: String;
Topic: TTopic;
CtrlRect: TControlRect;
SetupPath: String;
lsPathBox: TStringList;
implementation{$R *.DFM}procedure TfrmMain.ChangeWindow(bgPic,HoverPic,Brf: String);
begin
if Assigned(Ctrl.TreeView) then Ctrl.FreeTreeView;
if Assigned(Ctrl.Memo) then Ctrl.FreeMemo;
if Assigned(Ctrl.Image) then Ctrl.FreeImage; with myVss do
begin
BgPicture:=AppPath + bgPic;
if HoverPic <> '' then
HoverPicture:=AppPath + HoverPic;
UpdatePicture;
if HoverPic <> '' then
CreateButtons(AppPath + Brf);
end;
end;procedure TfrmMain.RunFile(FileName: String);
begin
ShellExecute(0,'Open',PChar(FileName),nil,nil,SW_SHOWNORMAL);
end;procedure TfrmMain.WMEraseBkgnd(var Msg: TWMEraseBkgnd);
begin
Msg.Result:=1;
end;procedure TfrmMain.tm_LoadTimer(Sender: TObject);
begin
tm_Load.Enabled:=False;
myVss.CreateBKG(frmMain);
ChangeWindow('skin\main.jpg','skin\mainhover.jpg','data\main.brf');
end;procedure TfrmMain.FormDestroy(Sender: TObject);
begin
if Screen.Width < 1024 then HideShowTaskBar(False);
lsPathBox.Clear;
lsPathBox.Free;
end;procedure TfrmMain.ApplicationEvents1Deactivate(Sender: TObject);
begin
if (Screen.Width < 1024) then
if bJustShow then bJustShow:=False
else HideShowTaskBar(False);
end;procedure TfrmMain.ApplicationEvents1Activate(Sender: TObject);
begin
if Screen.Width < 1024 then HideShowTaskBar(True);
end;procedure TfrmMain.FormShow(Sender: TObject);
begin
if Screen.Width < 1024 then
begin
HideShowTaskBar(True);
bJustShow:=True;
end;
end;procedure TfrmMain.FormCreate(Sender: TObject);
begin
AppPath:=CheckPath(ExtractFilePath(ParamStr(0)));
ClientWidth:=800; ClientHeight:=600;
lsPathBox:=TStringList.Create;
end;function TfrmMain.StandardCommand(sCmd: String): Boolean;
begin
Result:=True;
if sCmd = 'EXIT' then
begin
myVss.MainHandle:=Handle;
myVss.CanClose:=True;
Ctrl.FreeResource;
ChangeWindow('Skin\Exit.jpg','','');
Topic:=ttNone;
myVss.FreeResource;
end
else if sCmd = 'MIN' then Application.Minimize
else if sCmd = 'BACK' then
begin
Topic:=ttNone;
ChangeWindow('Skin\Main.jpg','Skin\MainHover.jpg','Data\Main.brf');
end
else if sCmd = 'SETUP' then
begin
if SetupPath <> '' then RunFile(SetupPath);
end
else if sCmd = 'BROWSE' then
begin
if SetupPath <> '' then RunFile(ExtractFilePath(SetupPath));
end
else if sCmd = '$1' then
begin
Topic:=ttSoft;
ChangeWindow('skin\soft.jpg','skin\softhover.jpg','data\soft.brf');
FillCtrlRect(55,144,247,347); // TreeView
Ctrl.CreateTreeView(frmMain,CtrlRect,True);
FillCtrlRect(371,142,384,399); // Memo
Ctrl.CreateMemo(frmMain,CtrlRect,True);
Ctrl.LoadFilesToTreeView(AppPath + 'soft\tree.txt',AppPath + 'soft\path.txt',1);
end
else if sCmd = '$2' then
begin
Topic:=ttVCL;
ChangeWindow('skin\vcl.jpg','skin\vclhover.jpg','data\vcl.brf');
if lsPathBox.Count = 0 then lsPathBox.LoadFromFile(AppPath + 'vcl.pth');
end
else if sCmd = '$3' then RunFile(AppPath + '音效')
else if sCmd = '$4' then RunFile(AppPath + '图标')
else Result:=False;
end;procedure TfrmMain.myVssBtnClick(Sender: TObject; szCmdLine: String;
HeadCmd: Char);
var
nIndex: Integer;
begin
if StandardCommand(szCmdLine) then exit;
if HeadCmd <> '@' then exit;
nIndex:=StrToInt(Copy(szCmdLine,2,Length(szCmdLine)-1));
RunFile(AppPath + lsPathBox.Strings[nIndex-1]);
end;procedure TfrmMain.FillCtrlRect(nLeft,nTop,nWidth,nHeight: Integer);
begin
CtrlRect.crWidth:=nWidth; CtrlRect.crHeight:=nHeight;
CtrlRect.crLeft:=nLeft; CtrlRect.crTop:=nTop;
end;procedure TfrmMain.CtrlTreeViewOnClick(Sender: TObject;
FilePathName: String);
begin
SetupPath:='';
if FilePathName = '' then
begin
Ctrl.ShowText('');
exit;
end;
SetupPath:=AppPath + FilePathName;
Ctrl.ShowText(ChangeFileExt(SetupPath,'.txt'));
end;procedure TfrmMain.CtrlTreeViewOnKeyUp(Sender: TObject);
begin
Ctrl.TreeView.OnClick(Self);
end;end.