
20.08.2013, 14:42
|
Активный
|
|
Регистрация: 21.03.2013
Адрес: Приднестровье
Сообщения: 202
Версия Delphi: Delphi 7
Репутация: 10
|
|
Цитата:
Сообщение от icWasya
Как-то так
|
Делаю так
Код:
begin
if S='' then
begin
sOpenDialog1.Execute;
S:=sOpenDialog1.FileName;
if S='' then
begin
ShowMessage('Не выбрал');
end
else
h := ExtractAssociatedIcon(hInstance,PChar(S), IconINdex);
Ico:=TIcon.Create();
Ico.Handle:=H;
sBitBtn1.Glyph:=ico;
Ico.Free;
end
else
ShellExecute (Form1.Handle, nil, PChar(S), nil, nil, SW_RESTORE)}
end;
Ругается на Incompatible types: 'TBitmap' and 'TIcon' (15 строка)
|