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. A problem with threads

A problem with threads

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorial
2 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.
  • M Offline
    M Offline
    mydrive22
    wrote on last edited by
    #1

    I am a VB.net student and have had a relatively easy go of it til now. For some reason the concept of threading has been a problem for me. Our assignment is to make a ball bounce around the screen (changing directions when it hits a wall). It must us a class (ball). and I understand the basic code of making the ball change directions, but have no idea on how to incorporate this using threads. Any pointers or starters would be great.

    S 1 Reply Last reply
    0
    • M mydrive22

      I am a VB.net student and have had a relatively easy go of it til now. For some reason the concept of threading has been a problem for me. Our assignment is to make a ball bounce around the screen (changing directions when it hits a wall). It must us a class (ball). and I understand the basic code of making the ball change directions, but have no idea on how to incorporate this using threads. Any pointers or starters would be great.

      S Offline
      S Offline
      shopi30
      wrote on last edited by
      #2

      Hi mydrive22. Every application when start has a thread (Primary Thread [PT]). The Thread is a subprocess, this run at same time that PT. For example: When you walk and talk, if this process was a only process you need wait for walk process finish and start the talk process. but if you start 1 process for walk and 1 process for talk, the PT proceess is free for do anything. It's the same with forms. If you use one proceess for retrieve data, you can use the PT for do anything on the form. You need study "System.Threading", "Control.BeginInvoke", "Control.EndInvoke", "System.MulticastDelegate" I hope that this solve your problem

      SINCERELY. ANTHONY ACUÑA PREFERED PHRASE: SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?

      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