Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Error "Object reference not set to an instance of an object"

Error "Object reference not set to an instance of an object"

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dan Suthar
    wrote on last edited by
    #1

    Hi, I am just tired getting this error "Object reference not set to an instance of an object" in my project. I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread. Some code is as follows: Private thrDownload As Thread '''''' Some code is here''''''''''''' ' ' ' 'Now On This line I am getting an error : thrDownload.Start(0) ' Or On thrDownload.Pause(0) & thrDownload.Stop(0) the same error ! ' ' ' ' '''''' Some code is here''''''''''''' If anyone wants then I can paste the whole code here but It's lots of lines of code ! :-> Any Suggestions ? :doh: Thanks, Dan

    G 1 Reply Last reply
    0
    • D Dan Suthar

      Hi, I am just tired getting this error "Object reference not set to an instance of an object" in my project. I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread. Some code is as follows: Private thrDownload As Thread '''''' Some code is here''''''''''''' ' ' ' 'Now On This line I am getting an error : thrDownload.Start(0) ' Or On thrDownload.Pause(0) & thrDownload.Stop(0) the same error ! ' ' ' ' '''''' Some code is here''''''''''''' If anyone wants then I can paste the whole code here but It's lots of lines of code ! :-> Any Suggestions ? :doh: Thanks, Dan

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Dan`M wrote:

      I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread.

      Yes, it can. You have to create the Thread object before you can use it.

      --- "Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things." -- Douglas Adams

      D 1 Reply Last reply
      0
      • G Guffa

        Dan`M wrote:

        I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread.

        Yes, it can. You have to create the Thread object before you can use it.

        --- "Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things." -- Douglas Adams

        D Offline
        D Offline
        Dan Suthar
        wrote on last edited by
        #3

        sorry but can you show some example code please.. :->

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups