Fórum Capturar a versão do sistema do delphi #560382
18/08/2016
0
eu peguei na net um código para capturar a versão mas não consigo jogar a versão para ser apresentada nesse panel
Function VersaoExe: String;
type
PFFI = ^vs_FixedFileInfo;
var
F : PFFI;
Handle : Dword;
Len : Longint;
Data : Pchar;
Buffer : Pointer;
Tamanho : Dword;
Parquivo: Pchar;
Arquivo : String;
begin
Arquivo := Application.ExeName;
Parquivo := StrAlloc(Length(Arquivo) + 1);
StrPcopy(Parquivo, Arquivo);
Len := GetFileVersionInfoSize(Parquivo, Handle);
Result := '';
if Len > 0 then
begin
Data:=StrAlloc(Len+1);
if GetFileVersionInfo(Parquivo,Handle,Len,Data) then
begin
VerQueryValue(Data, '\',Buffer,Tamanho);
F := PFFI(Buffer);
Result := Format('%d.%d.%d.%d',[HiWord(F^.dwFileVersionMs),LoWord(F^.dwFileVersionMs),HiWord(F^.dwFileVersionLs),Loword(F^.dwFileVersionLs)]);
end;
StrDispose(Data);
end;
StrDispose(Parquivo);
end;
Emanuel Gonçalves
Curtir tópico
+ 0Post mais votado
18/08/2016
Se for, teste:
Panel1.Caption:= VersaoExe;
Ou você pode também colocar em um label dentro deste panel:
Label1.Caption:= VersaoExe;
Natanael Ferreira
Gostei + 2
Mais Posts
18/08/2016
Emanuel Gonçalves
Se for, teste:
Panel1.Caption:= VersaoExe;
Ou você pode também colocar em um label dentro deste panel:
Label1.Caption:= VersaoExe;
não aparece nada!
Gostei + 0
18/08/2016
Emanuel Gonçalves
mais uma dúvida, tem como mudar a versão, de 1.0.0.0 para outra?
Gostei + 0
18/08/2016
Natanael Ferreira
- Project/Options/Application/Version Info.
Gostei + 0
19/08/2016
Emanuel Gonçalves
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)