Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[WD11]Afficher un image à partir d'une url

3 réponses
Avatar
Vincent
Bonjour,

je désire afficher dans une champ image, une image située sur une site
internet, est ce possible ?

un petit bout de code ?

merci

Vincent

3 réponses

Avatar
Romain PETIT
Vincent a couché sur son écran :
Bonjour,

je désire afficher dans une champ image, une image située sur une site
internet, est ce possible ?

un petit bout de code ?




En 7.5, ce n'est pas possible, essaye quand même avec :
Image1 =
"http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg"

Sinon, 2 solutions (parmi d'autres ?) :

1- Utiliser un champ HTML (ou l'activeX IE / Firefox) :
HTML1 = "http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg"

2- télécharger en local l'image et l'affecter au champ.

http://msdn2.microsoft.com/en-us/library/ms775123.aspx
****************************************
S_OK est un entier = 0x0
E_OUTOFMEMORY est un entier = 0x8007000E

sUrlFichier est une chaîne =
"http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg"
sFichierLocal est une chaîne = "c:poignedemain_small.jpg"

SI API("urlmon", "URLDownloadToFileA", 0, sUrlFichier, sFichierLocal,
0, 0) = S_OK ALORS
Image1 = sFichierLocal
FIN


A+

--
Romain PETIT
http://cerbermail.com/?O16kfXOFcq
(cliquez sur le lien ci-dessus pour me contacter en privé)
Avatar
Romain PETIT
Vincent a couché sur son écran :
Bonjour,



Bonjour,

je désire afficher dans une champ image, une image située sur une site
internet, est ce possible ?
un petit bout de code ?




En 7.5, ce n'est pas possible directement, essaye quand même en 11 (on
ne sait jamais) avec :
Image1 =
"http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg"

Sinon, 2 solutions (parmi d'autres ?) :

1- Utiliser un champ HTML (ou l'activeX IE / Firefox) :
HTML1 = "http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg"

2- télécharger en local l'image et l'affecter au champ.

http://msdn2.microsoft.com/en-us/library/ms775123.aspx
****************************************
S_OK est un entier = 0x0
E_OUTOFMEMORY est un entier = 0x8007000E

sUrlFichier est une chaîne =
"http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg&quot" target="_blank" class="text-blue hover:opacity-90 " style="word-break: break-all;" rel="noopener nofollow">http://windev.dev4u.org/images/stories/poignedemain_small.jpg"
sFichierLocal est une chaîne = "c:poignedemain_small.jpg"

SI API("urlmon", "URLDownloadToFileA", 0, sUrlFichier, sFichierLocal,
0, 0) = S_OK ALORS
Image1 = sFichierLocal
FIN


A+

--
Romain PETIT
http://cerbermail.com/?O16kfXOFcq
(cliquez sur le lien ci-dessus pour me contacter en privé)
Avatar
b.engelmajer
SI HTTPRequête("http://groups.google.fr/groups/img/3nb/
groups_bar_fr.gif") ALORS
Image1 = HTTPDonneRésultat(HTTPRésultat)
FIN