Results 1 to 12 of 12

Thread: Getting Application Error while using thread

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    7

    Getting Application Error while using thread

    prepared a program in which download file from the url.
    it uses the MS-ITC control.
    the program executed with the help of thread and show progress bar.
    the dtrange thing is that some time is executed and some time it doesn't.
    and when we make the exe it shows the "application Error..........."
    and show the dialog box saying that send or don't send.

    please assist me to solve the problem.

    thankx in advance.

    Vinay Gupta
    Last edited by kvingupta; Mar 23rd, 2006 at 02:08 AM.

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: Getting Application Error while using thread

    welcome to vbforums

    have you tried searching the forums for some similar threads like yours. do a search. there are a lot of threads that can answer your post. if not. get back here and tell that they are not the ones that you want
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: Getting Application Error while using thread

    could you try posting your code? let's try to debug this...
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  4. #4
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Getting Application Error while using thread

    Quote Originally Posted by kvingupta
    prepared a program in which download file from the url.
    it uses the MS-ITC control.
    the program executed with the help of thread and show progress bar.
    the dtrange thing is that some time is executed and some time it doesn't.
    and when we make the exe it shows the "application Error..........."
    and show the dialog box saying that send or don't send.

    please assist me to solve the problem.

    thankx in advance.

    Vinay Gupta
    Remove your mail from there before bots/spiders catch it and start spamming you.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    7

    Re: Getting Application Error while using thread

    Quote Originally Posted by lerroux
    could you try posting your code? let's try to debug this...
    how to share my code, it has 3 files
    1. form
    2. module
    3. class

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Getting Application Error while using thread

    Quote Originally Posted by jcis
    Remove your mail from there before bots/spiders catch it and start spamming you.
    Unless you enjoy getting a ton of junk mail and spam mail, I would suggest you heed jcis advice.
    Quote Originally Posted by kvingupta
    how to share my code, it has 3 files
    1. form
    2. module
    3. class
    The code that is relevant to your question is what we need to see.

  7. #7
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Getting Application Error while using thread

    or just zip-up the full project and attach it

  8. #8

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    7

    Re: Getting Application Error while using thread

    Hi,
    Please find the zip file as an attachment of code.
    it also contain the supporting ehich guided me to do so.
    my basic problem is to download more than one files simultaneousely from the internet.
    and show the progress bar displaying the staus of each.
    Attached Files Attached Files
    Last edited by kvingupta; Mar 23rd, 2006 at 02:09 AM.

  9. #9
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Getting Application Error while using thread

    OK, here is the problem.

    You can create new threads in VB6 using the CreateThread API, but you cannot use them to do anything.

    VB6 keeps all it's initialization stuff for all the run time libraries and controls in what is called "thread local storage". So, when you spawn a new thread that thread no longer has access to the VB libraries and controls.

    If you really want to do multithreading then upgrade to VB.NET.

  10. #10
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Getting Application Error while using thread

    And please remove your email address from both posts, for your own sake!

    Use the "Edit" button at the bottom right corner of your posts. Or you'll get a ton of unsolicited and mostly illiterate offers in your inbox/junk folder.

  11. #11

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    7

    Re: Getting Application Error while using thread

    ok i have removed email add

  12. #12

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    7

    Re: Getting Application Error while using thread

    Quote Originally Posted by moeur
    OK, here is the problem.

    You can create new threads in VB6 using the CreateThread API, but you cannot use them to do anything.

    VB6 keeps all it's initialization stuff for all the run time libraries and controls in what is called "thread local storage". So, when you spawn a new thread that thread no longer has access to the VB libraries and controls.

    If you really want to do multithreading then upgrade to VB.NET.
    ---
    ok , will you tell me any other alternative method in vb 6.0 for downloading more than one files simultaneousely from a given url. and show the progress bar each.
    as you can see this in my program.
    and when one file gets any error other will not stop downloading.

    thanx

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