Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 21-03-2011
Paulao Paulao is offline
Miembro
 
Registrado: sep 2003
Ubicación: Rua D 31 Casa 1 - Inhoaíba - Rio de Janeiro - RJ - Brasil
Posts: 637
Poder: 21
Paulao Va por buen camino
Cargar Version en el Caption del Form

Como hago para cargar la version en el Caption del Form que yo configure en Project Options > Resource Compiler > Version Info?
Responder Con Cita
  #2  
Antiguo 21-03-2011
Avatar de rgstuamigo
rgstuamigo rgstuamigo is offline
Miembro
 
Registrado: jul 2008
Ubicación: Santa Cruz de la Sierra-Bolivia
Posts: 1.646
Poder: 17
rgstuamigo Va por buen camino
Arrow

Mira aquí...
Saludos...
__________________
"Pedid, y se os dará; buscad, y hallaréis; llamad, y se os abrirá." Mt.7:7
Responder Con Cita
  #3  
Antiguo 22-03-2011
Avatar de rastafarey
rastafarey rastafarey is offline
Miembro
 
Registrado: nov 2003
Posts: 927
Poder: 21
rastafarey Va por buen camino
Resp

haber si esto te sirve.
Código Delphi [-]
unit AplicacionInfo;

interface
uses Windows, Classes, SysUtils;

type
  TVersionInfo = class(TObject)
  private
    FData: Pointer;
    FSize: Cardinal;
    FNombreCompania: string;
    FDescripcionDelArchivo: string;
    FVersionDelArchivo: string;
    FNombreInterno: string;
    FDerechosDeCopiado: string;
    FMarcasRegistradas: string;
    FNombreOriginalDelArchivo: string;
    FNombreDelProducto: string;
    FVersionDelProducto: string;
    FComentarios: string;
    FVersionInterna: Integer;
  public
    constructor Create(FileName: string); Overload;
    constructor Create; Overload;
    destructor Destroy; override;
    property NombreCompania: string read FNombreCompania;
    property DescripcionDelArchivo: string read FDescripcionDelArchivo;
    property VersionDelArchivo: string read FVersionDelArchivo;
    property NombreInterno: string read FNombreInterno;
    property DerechosDeCopiado: string read FDerechosDeCopiado;
    property MarcasRegistradas: string read FMarcasRegistradas;
    property NombreOriginalDelArchivo: string read FNombreOriginalDelArchivo;
    property NombreDelProducto: string read FNombreDelProducto;
    property VersionDelProducto: string read FVersionDelProducto;
    property Comentarios: string read FComentarios;
    property VersionInterna: Integer read FVersionInterna;
  end;

implementation
{ TVersionInfo }

constructor TVersionInfo.Create(FileName: string);
var
  sz, lpHandle, tbl: Cardinal;
  lpBuffer: Pointer;
  str: PChar;
  strtbl: string;
  int: PInteger;
  hiW, loW: Word;
  Function Leer(Const pcValor: String): String;
  Begin
    VerQueryValue(FData, PChar('\\StringFileInfo\' + strtbl + pcValor), lpBuffer, sz);
    str := lpBuffer;
    Result := str;
  End;
begin
  inherited Create;
  FSize := GetFileVersionInfoSize(PChar(FileName), lpHandle);
  FData := AllocMem(FSize);
  GetFileVersionInfo(PChar(FileName), lpHandle, FSize, FData);

  VerQueryValue(FData, '\\VarFileInfo\Translation', lpBuffer, sz);
  int := lpBuffer;
  hiW := HiWord(int^);
  loW := LoWord(int^);
  tbl := (loW shl 16) or hiW;
  strtbl := Format('%x', [tbl]);
  if Length(strtbl) < 8 then
    strtbl := '0' + strtbl;

  FNombreCompania := Leer('\CompanyName');
  FDescripcionDelArchivo := Leer('\FileDescription');
  FVersionDelArchivo := Leer('\FileVersion');
  FNombreInterno := Leer('\InternalName');
  FDerechosDeCopiado := Leer('\LegalCopyright');
  FMarcasRegistradas := Leer('\LegalTrademarks');
  FNombreOriginalDelArchivo := Leer('\OriginalFilename');
  FNombreDelProducto := Leer('\ProductName');
  FVersionDelProducto := Leer('\ProductVersion');
  FComentarios := Leer('\Comments');
  FVersionInterna := StrToInt(Leer('\VersionInterna'));
end;

constructor TVersionInfo.Create;
begin
  Create(ParamStr(0));
end;

destructor TVersionInfo.Destroy;
begin
  FreeMem(FData);
  inherited;
end;

end.
__________________
Todo se puede, que no exista la tecnología aun, es otra cosa.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Cambiar el Caption de un Form en tiempo de ejecucion kikodelphi OOP 5 14-01-2012 22:54:22
Cambiar en Form color en la Barra (Caption) shoulder Varios 1 03-08-2010 20:40:50
Cambiar el color al caption de la form mefixxto OOP 5 09-04-2009 18:28:41
Cargar un sfw de flash en un form REHome .NET 7 01-11-2007 05:27:37
traer al frente un form no modal (de entre varios), utilizando el valor en el caption jcapitan OOP 2 23-05-2007 02:33:43


La franja horaria es GMT +2. Ahora son las 07:31:15.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi