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. Threading

Threading

Scheduled Pinned Locked Moved Visual Basic
helpquestion
5 Posts 4 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.
  • T Offline
    T Offline
    Taylor
    wrote on last edited by
    #1

    I have a form with a progressbar and a dynamic graphic control this dynamic control freezes when i run a method in the form. so i run the method as a new thread in a class. the problem is that the value of progress bar should depend to a variable in the method. when i try to assign a value to the progress bar from the thread class I recieve the error message which says: the control is not created within the thread and can not access to its properties. so how can i access to the value property of the progressbar?

    A.E.K

    S I D 3 Replies Last reply
    0
    • T Taylor

      I have a form with a progressbar and a dynamic graphic control this dynamic control freezes when i run a method in the form. so i run the method as a new thread in a class. the problem is that the value of progress bar should depend to a variable in the method. when i try to assign a value to the progress bar from the thread class I recieve the error message which says: the control is not created within the thread and can not access to its properties. so how can i access to the value property of the progressbar?

      A.E.K

      S Offline
      S Offline
      Sonia Gupta
      wrote on last edited by
      #2

      what code u r writing?

      1 Reply Last reply
      0
      • T Taylor

        I have a form with a progressbar and a dynamic graphic control this dynamic control freezes when i run a method in the form. so i run the method as a new thread in a class. the problem is that the value of progress bar should depend to a variable in the method. when i try to assign a value to the progress bar from the thread class I recieve the error message which says: the control is not created within the thread and can not access to its properties. so how can i access to the value property of the progressbar?

        A.E.K

        I Offline
        I Offline
        isidor7
        wrote on last edited by
        #3

        well it's simple! you have to declare your class with events so when a value changes you will raise an event. then... your form will grab the event and from the form you will setup the value property of your progress bar. isidoros

        1 Reply Last reply
        0
        • T Taylor

          I have a form with a progressbar and a dynamic graphic control this dynamic control freezes when i run a method in the form. so i run the method as a new thread in a class. the problem is that the value of progress bar should depend to a variable in the method. when i try to assign a value to the progress bar from the thread class I recieve the error message which says: the control is not created within the thread and can not access to its properties. so how can i access to the value property of the progressbar?

          A.E.K

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Look into the BackgroundWorker component. It exposes a standardize method of reporting progress.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          T 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Look into the BackgroundWorker component. It exposes a standardize method of reporting progress.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            T Offline
            T Offline
            Taylor
            wrote on last edited by
            #5

            thanks a lot

            A.E.K

            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