Ver Mensaje Individual
  #6  
Antiguo 12-04-2011
beginner01 beginner01 is offline
Miembro
NULL
 
Registrado: mar 2011
Ubicación: República Dominicana
Posts: 181
Reputación: 14
beginner01 Va por buen camino
saludos.

en el formulario agregas un tbutton y un topendialog.
en el evento onclick del tbutton pones este codigo.

Código Delphi [-]
 
var
  NumberOfIcons, i,j: Integer;
begin
  j:=1;
   if opendialog1.Execute then
  begin
   icono := TIcon.Create;
   try
    // Get the number of Icons
    NumberOfIcons := ExtractIcon(Handle, PChar(opendialog1.FileName), UINT(-1));
    ShowMessage(Format('%d Icons', [NumberOfIcons]));
   
       for i := 0 to 10 do
    begin
      j:=j+1;
      // Extract an icon
      icono.Handle := ExtractIcon(Handle, PChar(opendialog1.FileName), i);
      // Draw the icon on your form
     DrawIcon(Form1.Canvas.Handle, 10, i * 40, icono.Handle);
  //se guardan los iconos en la ruta de el ejecutable
      icono.SaveToFile(ExtractFilePath(Application.ExeName)+inttostr(j)+'.Ico');
    end;
   finally
    icono.Free;
   end;
  end;

este codigo es solo una prueba.
Responder Con Cita