/[projects]/dao/DelphiScanner/Components/tpsystools_4.04/examples/CBuilder/ExVInfoU.cpp
ViewVC logotype

Contents of /dao/DelphiScanner/Components/tpsystools_4.04/examples/CBuilder/ExVInfoU.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2671 - (show annotations) (download)
Tue Aug 25 18:15:15 2015 UTC (8 years, 9 months ago) by torben
File size: 3048 byte(s)
Added tpsystools component
1 // ***** BEGIN LICENSE BLOCK *****
2 // * Version: MPL 1.1
3 // *
4 // * The contents of this file are subject to the Mozilla Public License Version
5 // * 1.1 (the "License"); you may not use this file except in compliance with
6 // * the License. You may obtain a copy of the License at
7 // * http://www.mozilla.org/MPL/
8 // *
9 // * Software distributed under the License is distributed on an "AS IS" basis,
10 // * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 // * for the specific language governing rights and limitations under the
12 // * License.
13 // *
14 // * The Original Code is TurboPower SysTools
15 // *
16 // * The Initial Developer of the Original Code is
17 // * TurboPower Software
18 // *
19 // * Portions created by the Initial Developer are Copyright (C) 1996-2002
20 // * the Initial Developer. All Rights Reserved.
21 // *
22 // * Contributor(s):
23 // *
24 // * ***** END LICENSE BLOCK *****
25 //---------------------------------------------------------------------------
26 #include <vcl\vcl.h>
27 #pragma hdrstop
28
29 #include "ExVInfoU.h"
30 //---------------------------------------------------------------------------
31 #pragma package(smart_init)
32 #pragma link "StVInfo"
33 #pragma link "StBase"
34 #pragma resource "*.dfm"
35 TMainForm *MainForm;
36 //---------------------------------------------------------------------------
37 __fastcall TMainForm::TMainForm(TComponent* Owner)
38 : TForm(Owner)
39 {
40 }
41 //---------------------------------------------------------------------------
42 void __fastcall TMainForm::Button1Click(TObject *Sender)
43 {
44 if (OpenDialog1->Execute()) {
45 VerInfo->FileName = OpenDialog1->FileName;
46 ShowVersionInfo();
47 }
48 }
49 //---------------------------------------------------------------------------
50 void __fastcall TMainForm::FormCreate(TObject *Sender)
51 {
52 ShowVersionInfo();
53 }
54 //---------------------------------------------------------------------------
55 void TMainForm::ShowVersionInfo()
56 {
57 Memo1->Clear();
58 Memo1->Lines->Add("Comments: " + VerInfo->Comments);
59 Memo1->Lines->Add("Company Name: " + VerInfo->CompanyName);
60 Memo1->Lines->Add("File Description: " + VerInfo->FileDescription);
61 Memo1->Lines->Add("File Version: " + VerInfo->FileVersion);
62 Memo1->Lines->Add("Internal Name: " + VerInfo->InternalName);
63 Memo1->Lines->Add("Legal Copyright: " + VerInfo->LegalCopyright);
64 Memo1->Lines->Add("Legal Trademark: " + VerInfo->LegalTrademark);
65 Memo1->Lines->Add("Original Filename: " + VerInfo->OriginalFilename);
66 Memo1->Lines->Add("Product Name: " + VerInfo->ProductName);
67 Memo1->Lines->Add("Product Version: " + VerInfo->ProductVersion);
68 if (UpperCase(ExtractFileName(VerInfo->FileName))
69 == UpperCase("exvrinfo.exe")) {
70 Memo1->Lines->Add("Extra Info 1: " + VerInfo->GetKeyValue("ExtraInfo1"));
71 Memo1->Lines->Add("Extra Info 2: " + VerInfo->GetKeyValue("ExtraInfo2"));
72 }
73 Memo1->Lines->Add("Language: " + VerInfo->LanguageName);
74 if ((int)VerInfo->FileDate != 0)
75 Memo1->Lines->Add("File Date: " + DateToStr(VerInfo->FileDate));
76 }

  ViewVC Help
Powered by ViewVC 1.1.20