Solved

IE control; Offline property

Posted on 2000-04-11
8
219 Views
Last Modified: 2013-11-25
Hello,
I'm developing a control that contains the Internet Explorer.  This controls updates the explorer from time to time with a file locally located on the disk.
So I put the OffLine property of the IE to True, but after reopening the project, the property hasn't been saved, so it's put to False again, and I'm having trouble again.  Putting it Offline at run time doesn't seem to help.

Can anyone help me please?
Thanks
0
Comment
Question by:guntherds
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:gelog
ID: 2703689
Hi guntherds,

Don't use the Offline property of the WebBrowser Control. It doesn't work. You can use WinInet API to do it. Download my CWinInetConnection class from http://www.vbip.com/wininet/wininet_connection_01.asp. This class allows you to detect the Internet connection and its properties, establish and hang up the connection, switch the system state known as Online/Offline mode.

Good luck and welcome to http://www.vbip.com
0
 

Author Comment

by:guntherds
ID: 2705768
Thanks,
but how can I use this with the IE control, my control is never going on the internet, it just updates an HTML file that some other component/application is updating.

Please help me further, you will get the points.
Thanks
gunther
0
 

Author Comment

by:guntherds
ID: 2705779
see above comment
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:gelog
ID: 2706713
If it is clear to me, you want to be able to set Offline/Online mode for the instance of the WebBrowser control. It is impossible by design, but you can change this mode for a whole system. My class allows you to do it. And it is not clear to me why you want to set Offline mode for your task.

To set Offline mode in your application put the following code to the Form_Load event procedure (you can choose another location for the code):

Private Sub Form_Load ()

Dim oConnection As CWinInetConnection

Set oConnection = New CWinInetConnection

oConnection.SetGlobalOffline
'now your WebBrowser control works in Offline mode
Set oConnection = Nothing

End Sub
0
 

Author Comment

by:guntherds
ID: 2706775
I'm willing to use the Offline/onLine property just because the system (it's even a POS system) is never going on the internet, it just has to show an HTML file (locally on the disk, or network).  So I thought to set the OffLine property on True
If I leave it on false, it given the error page .  
Or is it possible that I'm doing something wrong?  I'm passing the follwing string "D:\Temp\POSTransactionLine.HTM" to the Navigate method.

thanks
gunter
0
 
LVL 2

Accepted Solution

by:
gelog earned 100 total points
ID: 2706806
I've disconnected and tested your case right now (using Navigate method with local path) and never got an error. The local page is available to the WebBrowser control in any mode. What kind of error you got?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2718638
just posting a comment to see if i can figure out what hes trying to do as well
0
 

Author Comment

by:guntherds
ID: 2758640
I've tested your solution, works well
But i've found a more simple one, put the url to about:blank at the start and everything works well

Thanks for helping me
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question