Results 1 to 10 of 10

Thread: web browser crashes vb6

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    web browser crashes vb6

    I've built a number of apps in the past couple of years that, without warning, crash vb6. If compiled, they'll just crash. There is no error message given. Since I'm in XP I usually just get that "had to close, send report box"

    Anyway, I have never really found the cause.

    A symptom is when the app is running and a page is loading and I use ctrl break to stop it, it will run for about 30 seconds like it can't finish, then crash as mentioned. Other times it crashes like that on its own.

    Anybody else?

    Thanks

    Wengang
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    in case I wasn't clear, it's only with the Webbrowser control
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  3. #3
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Is it only on your computer? In that case the WebBrowser component might not be correctly registered. Also make sure you've got IE's latest version (6.1 or so? ).

    The WebBrowser control causes some troubles now and again. As far as I know, the "FileDownload" event cannot be used. When I tried to use it in the VB debug mode it ran fine, but when compiled it crashed and mentioned some Automation error. So, try compiling and running the app without any code under the FileDownload event.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  4. #4
    Lively Member
    Join Date
    Aug 2009
    Posts
    113

    Re: web browser crashes vb6

    WebBrowser crashes but when I used the code below it was resolved

    Private Sub Form_Unload(Cancel As Integer)
    WebBrowser1.Navigate2 ""
    End Sub

  5. #5
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: web browser crashes vb6

    There can be a number of things that cause that. I have seen more than one. The only two I can remember are: Get an API definition wrong and that can do it. Also passing the wrong datatype OR a null reference when there is no error checking to third party controls or libraries can do it.

    The way to narrow it down is to comment out large blocks of code. Keep commenting out code until you get it to run without crashing. Then start putting code back in until you find the culprit.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  6. #6

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    Re: web browser crashes vb6

    funny what time can do
    I don't even remember posting this.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  7. #7

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    Re: web browser crashes vb6

    oh,
    now I do vaguely recall
    for some reason (windows version, dll version, etc)
    I had to go to all my old apps, delete the actual WB component from all forms and then add them back and recompile and the apps worked again.
    Can't remember what it was now.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  8. #8
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: web browser crashes vb6

    lol

    I just saw the date!!
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  9. #9
    Lively Member
    Join Date
    Aug 2009
    Posts
    113

    Re: web browser crashes vb6

    But this problem for me is just new!!

    I found this from googling
    I wrote I resolved the problem by putting WebBrowser1.Navigate2 "" in the unload but it acctually doesnt resorved at least in the developing time, it sometimes crash and close VB

    do you know any safe way to use this WebBrowser
    is there any alternative to it...
    Last edited by bahramvb; Mar 14th, 2011 at 11:12 AM.

  10. #10
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: web browser crashes vb6

    Then you should open a new thread. Sometimes crash doesn't help. You need to determine how to make the problem happen all the time. Then you can figure out what the problem is.

    WebBrowser is really just an API for IE.
    The safe way to use it is to figure out what it does not like that you're doing and avoid doing that. You may be doing something wrong, or you may be doing something right that the control can't handle. Until you find out, you won't know.

    Make notes of every step you take. Then hopefully you can recreate the problem following the exact procedure. Then determine what step is causing the problem.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width