Solved

IE control; Offline property

Posted on 2000-04-11
8
215 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
Comment Utility
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
Comment Utility
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
Comment Utility
see above comment
0
 
LVL 2

Expert Comment

by:gelog
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:guntherds
Comment Utility
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
Comment Utility
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
Comment Utility
just posting a comment to see if i can figure out what hes trying to do as well
0
 

Author Comment

by:guntherds
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now