Updating progress bar on a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • napstar
    New Member
    • Nov 2006
    • 55

    Updating progress bar on a form

    I have a Progress Control on a Form and a class (ImportClass) which imports rows from a file.
    I would like to call the PerformStep method of the form control from the Import class.
    Does anyone know how this can be achieved?Code sample would be appreciated.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Raise an event in the Import Class.
    Your form subscribes to that event and moves the progress.

    Here are a couple tutorials for events from one class to another.
    Events tutorial (including Form to Form which is the same as class to class)
    This tutorial for a cash register does exactly that: It makes a virtual numeric keyboard.

    Comment

    • napstar
      New Member
      • Nov 2006
      • 55

      #3
      Thanks for the reply.I don't want you to do my work but a code sample would really go a long way in helping.

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        Did you look at the Events tutorial?
        It shows you how to raise an event in one class and subscribe to it from another class. This is what you are wanting to do. Raise the event in the Imports class and respond to it in your form.

        Comment

        Working...