Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS web Ctrl works with createobject not Do form
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
MS web Ctrl works with createobject not Do form
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00984648
Message ID:
00984648
Views:
59
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">&nbsp; </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">&nbsp;</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.
Next
Reply
Map
View

Click here to load this message in the networking platform