Help me ! attente du chargement d'une page

cs_Shad0w Messages postés 6 Date d'inscription mercredi 15 janvier 2003 Statut Membre Dernière intervention 11 octobre 2003 - 15 févr. 2003 à 12:31
cs_Nono40 Messages postés 962 Date d'inscription mercredi 3 avril 2002 Statut Membre Dernière intervention 12 septembre 2006 - 16 févr. 2003 à 02:05
Salut,

voilà, g un prog où il faut ouvrir une page web, pour cela j'utilise :

ShellExecute(Handle, 'OPEN', pchar(url.Text),'','', SW_HIDE);
ça marche sauf que j'aimerai l'ouvrir en invisble.

en suite je voudrais attendre le chargement de la page avant de continuer le prog.

Pour ceci j'utilise l'appel d'une fonction :

---
function chargement(NomFichier:string):boolean;
var
StartInfo : TStartupInfo;
ProcessInformation : TProcessInformation;
begin
result:=true;
ZeroMemory(@StartInfo, sizeof(StartInfo));
StartInfo.cb:=sizeof(StartInfo);
if CreateProcess(nil,PChar(NomFichier),nil,nil,true,0,nil,nil,StartInfo,ProcessInformation)
then WaitForSingleObject(ProcessInformation.hProcess, INFINITE)
else result:=false;
end;
---
je l'appelle avec :
chargement(url.Text);

Mais ça ne marche pas, la page s'ouvre et se ferme imédiatement.

Pourquoi ??!!

Merci

Shad0w

\\|//
(o o)
~~~~oOOo~(_)~oOOo~~~~
( '~.,.- [ Shad0w ] -.,.~' )
- Webmaster du site www.security-hack.fr.st
- Administrateur du forum www.forum4all.fr.fm

1 réponse

cs_Nono40 Messages postés 962 Date d'inscription mercredi 3 avril 2002 Statut Membre Dernière intervention 12 septembre 2006 2
16 févr. 2003 à 02:05
Pourquoi ne pas utiliser un TWebBrowser dans une fenêtre de ton application ? Il suffirait de le mettre invisible, de charger la page, puis de le rendre visible sur l'évènement OnDownloadComplete.

--- :sleepy) Nono40@fr.st :sleepy) ---
Nouveau ---> Nono40.fr.st
0
Rejoignez-nous