选Project菜单有Options一项 页上有VersionInfo一项,你可以加入你Exe文件的版本号

解决方案 »

  1.   

    不是,我要在delphi程序的form上显示版本号,我想有没个变量,自动
      

  2.   

        zyjzyj说的不是没有道理,但你还得在Form的MouseMove事件中使用 GetVersionOfFile(Api)函数即可解决。
      

  3.   

    GetVersionOfFile.....
    我写的是个ActiveX form,用网页调用.....能给个例子么?如何在ActiveX Form里用
    GetVersionOfFile????
      

  4.   

       难道ActiveX Form不能用Win32api吗?且ActiveX Project Wizard中有include Version Information 选项。至于Events,用网页调用也一样加。
      

  5.   

    能给我个调用例子么?我不知道如何去调用这个函数在网页上的activex上,因为函数里面的path不知道如何设定
      

  6.   

    不知以下帮助有用否?我上网不太容易,基本上只能在周六、周日有限的时间,请见谅。例子容我想一天,好吗?
    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.
      

  7.   

    我写过一个控件,在http://go1.163.com/~comanche/share/dev/mctrls.zip中,其中一个叫TAboutDialog的可实现你要的功能。
      

  8.   

    Tell you no matter!
    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!