Results 1 to 4 of 4

Thread: Another form's controls

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    Hi, how can I set values for a progressbar on another form? I have a timer on one form that needs to show its progress from a common progressbar on another form. I know you can declare procedures as public to share them instead of the default private, but what about a control?

    Thanks in advance,
    Wade
    Wade

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I don't think you can, Even if you can't it kinda goes against the whole Idea of OO Programming, Just have a public property in your form something like

    Code:
    Public Property Let ProgressBarValue (Data as Integer)
    
        ProgressBar1.Value = Data
    
    End Property
    
    Public Property Get ProgressBarValue as Long
    
        ProgressBarValue = ProgressBar1.Value
    
    End Property
    Hope this helps

  3. #3
    Guest
    Hello Wade,

    If you really want to, use something like this.

    from the timer:

    frmMain.ProgressBar1.Value = YourValue


    Hope this helps,

    Roger

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    If I use a procedure, it works great. Thanks for the help.

    Wade
    Wade

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