Update lables on other form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry

    #1

    Update lables on other form

    Hi again,

    I have two forms as controls. Both are on a main form and with a treeview I
    switch back and forth between the two. On the first form is a calculation.
    The result of this calculation should also be shown on the second form when
    this is opened. The lables on the second form that need to be updated are on
    a tabcontol. I've tried gotfocus, activated, visiblechanged and god knows
    what else. The lables are changed only at the startup time of the program
    but not when I switch back and forth with the treeview.

    Any ideas?


    Thanks,

    Jerry


  • DWS

    #2
    RE: Update lables on other form

    Jerry,
    I've done the same thing before. Kind a old school solution to your problem.
    I just added a public method to each form to update the results.

    public sub updatelabel(s as string)
    label1.text = s
    end updatelabel

    Wow I then call updatelabel from anyother form.

    form1.updatelab el(form3.textbo x2.text)
    form2.updatelab el(form3.textbo x2.text)

    Good Luck
    DWS



    "Jerry" wrote:
    [color=blue]
    > Hi again,
    >
    > I have two forms as controls. Both are on a main form and with a treeview I
    > switch back and forth between the two. On the first form is a calculation.
    > The result of this calculation should also be shown on the second form when
    > this is opened. The lables on the second form that need to be updated are on
    > a tabcontol. I've tried gotfocus, activated, visiblechanged and god knows
    > what else. The lables are changed only at the startup time of the program
    > but not when I switch back and forth with the treeview.
    >
    > Any ideas?
    >
    >
    > Thanks,
    >
    > Jerry
    >
    >
    >[/color]

    Comment

    Working...