Results 1 to 3 of 3

Thread: Parm pass into a form load

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Question Parm pass into a form load

    I want to show a form from a another form by clicking a button.
    In doing so I wish to pass a couple values into the form I wish to show. In VB 6.0 I always used global variable which is bad, want to do it the "right way" in .NET, cant figure it out..

    Thanks
    Tom

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    create you form class an oveloaded New method with the parameters you need.


    Code:
    Public Sub New(blah as blah, blah as blah)
        MyBase.New()
    End Sub
    then when you create the form

    Dim myform As New FormBlah(blah, blah)
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Thumbs up Thanks, I will try it out! (NT)


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