JackNUMBER
Administrateur

Inscrit le: 25 Juin 2005
Messages: 700
Localisation: Paris
|
Posté le:
10 Jan 2007 2:06:21 |
  |
Rappels sur Delphi
bonjours à tous !!
voici un script pour extraire l'icône d'un fichier.
- mettre ShellApi dans use
- mettre un OpenDialog sur la form
- mettre un TImage sur la form
- remplacer begin en copiant/collant:
Code: |
var
lpiIcon : word;
h : hIcon;
begin
if OpenDialog1.Execute then
begin
h := ExtractAssociatedIcon(hInstance, PChar(OpenDialog1.Filename),lpiIcon);
DrawIcon(Image1.Canvas.Handle,0, 0, h);
end;
end; |
voilà !!
il faut s'y connaitre un p'tit peu pour les nom de composants... rien de bien méchant
a bientôt ! |
_________________ jacknumber.fr |
|