Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS web Ctrl works with createobject not Do form
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00984648
Message ID:
00984679
Vues:
24
Try to move the code from conntrol Init into a method and call it from form's init.

>I've embedded a web browser activeX control in a container and put it on a simple pageframe. It works fine when I instantiate the form from Command Window using:
>
>
>otest = NEWOBJECT('TestForm')
>otest.Show
>
>
>But after I create an actual .scx based on the form class and run it using: Do Form "TestForm1" VFP hangs.
>
>The code contained in the init method of the control is as follows:
>
>
>this.navigate("D:\VFP CUSTOM APPS\Pembroke\PLProject\Source\listbrowser.htm")
>
>*********IT HANGS IN ROUTINE BELOW
>DECLARE INTEGER Sleep IN WIN32API INTEGER nTimeout
>DO WHILE this.readystate # 4
>	Sleep(100)
>ENDDO
>
>this.Document.body.leftmargin = 0
>this.Document.body.topmargin = 0
>
>SET TEXTMERGE TO MEMVAR lcList NOSHOW
>SET TEXTMERGE ON
>\<table width="277" border="0" cellspacing="1" cellpadding="1">
>\  <tr>
>\   <td width="25" bgcolor="#0033CC" class="ListHeader">  </td>
>\    <td width="142" bgcolor="#0033CC" class="ListHeader"><div align="center">Description</div></td>
>\    <td width="64" bgcolor="#0033CC" class="ListHeader"><div align="center">In Process </div></td>
>\    <td width="64" bgcolor="#0033CC" class="ListHeader"><div align="center">Completed</div></td>
>\  </tr>
>\  <tr>
>\    <td><img src="delX.gif" width="15" height="15"></td>
>\	 <td><span class="NormalText">LineItem</span></td>
>\    <td><div align="center"> </div></td>
>\    <td><div align="center"><img src="greencheck.gif" width="15" height="15"></div></td>
>\  </tr>
>\</table>
>SET TEXTMERGE off
>SET TEXTMERGE to
>this.Document.body.innerHTML = lcList
>
>
>Please note that it only hangs if I put it on page 2 or higher of the page frame. On page 1 of the page frame it works fine. It also hangs if I put obrowser.navigate("about:blank")
>
>Thanks for any suggestions.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform