
23.10.2011, 13:54
|
 |
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
Код:
unit Unit1;
interface
uses
ShellAPI,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
OpenDialog1: TOpenDialog;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
h: HICON;
begin
if OpenDialog1.Execute then
begin
h:=ExtractIcon(HInstance, pchar(OpenDialog1.FileName),0);
DrawIcon(Image1.Canvas.Handle, 0, 0, h);
end;
end;
end.
__________________
Пишу программы за еду.
__________________
|