[SOLVED!] Web Browser Control Navigate error. |
Post Reply |
Author | |
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
Posted: 22 January 2010 at 12:48pm |
[SOLVED: VIEW POSTS BELOW FOR SOLUTION.]
Hello everyone. I would like to have custom error pages within my browser that would be displayed depending on the error that happens. I'm pretty familiar with error codes such as 404 and so on but I don't really know how to implement these into the control. I'm assuming it is under the navigate error even but Not sure what code or API that would need to be added here. Anyone help out a bit? I'd really appreciate it! Thanks & Regards in advance! |
|
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
|
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
Well, wouldn't you know that I was able to solve this one on my own as well. I guess we really do learn something new every day.
I will post another post below this one explaining the code I used to solve the problem just in case any of you all happen to run into any trouble too! |
|
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
|
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
Okay, I'll try to explain this the best that I can:
What you'll need: • One Web Browser control (I named mine "WB"). • One CJ PushButton (This isn't really required.) in the click event of the button place this code. Private Sub btnWB_Click() WB.Navigate ("http://www.google.co.in/test.htm") ' This is a bogus link. It's used to display an error. End Sub Next, under the WB's navigate error event, add: Private Sub WB_NavigateError(ByVal pDisp As Object, URL As Variant, TargetFrameName As Variant, StatusCode As Variant, Cancel As Boolean) If StatusCode = 404 Then MsgBox "Server not found." End Sub Hope this helps everyone as much as it has me. |
|
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |