CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: label

  1. #1
    Join Date
    Oct 2001
    Posts
    10

    label

    i have a computed data in a label in form 4. and when i press the next button ( command button) to jump the next form 5 i want the data shown in the text box in form 5. i want the transfer the data in label in form 4 to text box in form 5...what should i have to do

    Serdar Yorulmaz

  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: label

    do this in your Command button click event.
    [vbcode]
    Form5.Text1.Text = Label1.Caption

    John G

  3. #3
    Join Date
    Jan 2000
    Posts
    264

    Re: label


    frm5.txtMyText.Text = frm4.lblMyText.Caption





  4. #4
    Join Date
    Oct 2001
    Location
    Hyderabad,India
    Posts
    8

    Re: label

    Hi,

    Write a public procedure in the form5. Then call it from form4.

    Here is the example:

    'in form5...
    public sub PostData(Ctl as Control)
    if typeof Ctl is Label then
    text1.text = Ctl.caption
    end if
    end sub

    'in form4...
    call form5.PostData(form4.Label1)





    You can pass other controls like above and use them.


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

Featured