选Project菜单有Options一项 页上有VersionInfo一项,你可以加入你Exe文件的版本号
解决方案 »
- dbgrid column实时模糊查询
- 如何做一个软件的试用版本,功能完全开放,但有n天时间限制
- 谁能说说怎样调节音量??
- 关于mediaplayer控件的一个问题
- 高手!!!treeview中如何使根结点默认打开(用代码),子结构收缩,当点击子结点前的+号时再显示子结点的子结点
- 登录子窗口如何激活
- 哪里有详细讲解win32api的电子书可以下载?一定给分!
- 我想无限制的增加treeview的节点,怎么做啊?还有个问提就是我要做BOM,可能有10层记录,但在数据库中怎么存取啊,是要分几个表呢,还是
- 焦点问题,谁能帮我看一下这段代码!!
- 当table1.active设为true时,显示的是table中的第一条;如何设定显示哪一条记录
- 在Delphi中如何编辑使用一个资源文件?急!!!
- 在DELPHI中,有什么办法能知道一台计算机是否正登录在NT网上?
我写的是个ActiveX form,用网页调用.....能给个例子么?如何在ActiveX Form里用
GetVersionOfFile????
GetFile FTP Method(ActiveX)
DescriptionGets the specified file from the remote host and places it in the current directory.Return ValueVoid.Syntaxobject.GetFile [RemoteFile], [LocalFile]ParametersRemoteFileOptional. String containing the remote file to retrieve.
Data Type: String
Param: IN
Default Value: EmptyLocalFileOptional. String containing the local filename to use when saving the remote file.
Data Type: String
Param: IN
Default Value: EmptyCommentsThe arguments override the values from the corresponding FTP.RemoteFile and DocOutput.FileName properties. The value of the properties will not change. If the arguments are omitted, the value from the corresponding property will be used to provide a filenames for the get file operation.
Both local and remote names should be specified, even if they are the same.
Use the ReplyString to determine the result of this call. The data from this method is sent to the DocStream interface via the DocOutput event. During processing of the DocOutput event, the Operation property is set to FTPFile.
At First,you must define a struct named 'TFixedFileInfo' and a function named 'FileInfo'.
Like me to do a example!type
PFixedFileInfo = ^TFixedFileInfo;
TFixedFileInfo = record
dwSignature : DWORD;
dwStrucVersion : DWORD;
wFileVersionMS : WORD;
wFileVersionLS : WORD;
wProductVersionMS : WORD;
wProductVersionLS : WORD;
end;function FileInfo( const FileName :String ) : TFixedFileInfo;
var
dwHandle, dwVersionSize : DWORD;
strSubBlock : String;
pTemp : Pointer;
pData : Pointer;
begin
strSubBlock := '\';
dwVersionSize := GetFileVersionInfoSize( PChar( FileName ),
dwHandle );
if dwVersionSize <> 0 then
begin
GetMem( pTemp, dwVersionSize );
try
if GetFileVersionInfo( PChar( FileName ),
dwHandle,
dwVersionSize,
pTemp ) then
if VerQueryValue( pTemp,
PChar( strSubBlock ),
pData,
dwVersionSize ) then
Result := PFixedFileInfo( pData )^;
finally
FreeMem( pTemp );
end;
end;
end;procedure TForm1.Button1Click(Sender: TObject);
var
f1 : string;
x : TFixedFileInfo;
begin
f1 := Application.ExeName;
x := FileInfo( f1 );
Label1.Caption := f1 +
#13#10'Version: ' + IntToStr( x.wFileVersionLS ) + '.' +
IntToStr(x.wFileVersionMS ) +#13#10'Release: ' +
IntToStr( x.wProductVersionLS) +
#13#10'Build: ' + IntToStr( x.wProductVersionMS ) ;
end;If You need more information about File,touch me!