Results 1 to 9 of 9

Thread: [RESOLVED][02/03] how to pass variable from one form to another form

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    [RESOLVED][02/03] how to pass variable from one form to another form

    Hi all,

    Now i'm facing a problem when i passing a variable from one form to another form, i can't get the value.

    I used the method of property.
    vb code
    Form A
    Code:
    Private UserID as string
    Private Sub New()
       Me.User_ID = textbox1.text
    End Sub
    Public property User_ID() as string
       Get 
           Return UserID
       End Get
       Set (ByVal Value As String)
           UserID = Value
       End Set
    end property
    Form B --> Try to get value from Variable form A

    Code:
        dim frm as new FormA
        textbox1.text = frm.User_ID
    Last edited by nUflAvOrS; Aug 10th, 2007 at 07:08 PM.
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

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