data passing between windows forms

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

    #1

    data passing between windows forms

    i am new to windows aplication, i am planning to desing a program which has
    login form. i want to use in formation at second form which i used in login
    form.

    ex: i filled a dataset in login form how i can use this filled dataset in
    the other forms, or i want to use user name in the second form which was
    entered at login form


  • William Ryan

    #2
    Re: data passing between windows forms

    You can create properties of the forms and set them to the dataset or given
    variable. Or you can create a class with static properties one of which is
    your dataset. Then you can reference it from anywhere.

    HTH,

    Bill
    "Cantekin Guneser" <cantekingunese r@hotmail.com> wrote in message
    news:OP6vYNOlDH A.1728@TK2MSFTN GP11.phx.gbl...[color=blue]
    > i am new to windows aplication, i am planning to desing a program which[/color]
    has[color=blue]
    > login form. i want to use in formation at second form which i used in[/color]
    login[color=blue]
    > form.
    >
    > ex: i filled a dataset in login form how i can use this filled dataset[/color]
    in[color=blue]
    > the other forms, or i want to use user name in the second form which was
    > entered at login form
    >
    >[/color]


    Comment

    • Balasubramanian Ramanathan

      #3
      Re: data passing between windows forms

      Hi,
      In the second form declare a property or field of type Form and assign the
      login form to that variable and the show the second form...in the second
      form you can access the login form and the controls in it.. Make sure that
      the controls in the login form should have the access modifiers as internal
      or public. If it is priave it wont be visible in the second form
      Thanks
      balu
      "Cantekin Guneser" <cantekingunese r@hotmail.com> wrote in message
      news:OP6vYNOlDH A.1728@TK2MSFTN GP11.phx.gbl...[color=blue]
      > i am new to windows aplication, i am planning to desing a program which[/color]
      has[color=blue]
      > login form. i want to use in formation at second form which i used in[/color]
      login[color=blue]
      > form.
      >
      > ex: i filled a dataset in login form how i can use this filled dataset[/color]
      in[color=blue]
      > the other forms, or i want to use user name in the second form which was
      > entered at login form
      >
      >[/color]


      Comment

      • Cantekin Guneser

        #4
        Re: data passing between windows forms

        can you explain more if it is possible send me example code
        "William Ryan" <dotnetguru@com cast.nospam.net > wrote in message
        news:OcjdmTOlDH A.3504@TK2MSFTN GP11.phx.gbl...[color=blue]
        > You can create properties of the forms and set them to the dataset or[/color]
        given[color=blue]
        > variable. Or you can create a class with static properties one of which[/color]
        is[color=blue]
        > your dataset. Then you can reference it from anywhere.
        >
        > HTH,
        >
        > Bill
        > "Cantekin Guneser" <cantekingunese r@hotmail.com> wrote in message
        > news:OP6vYNOlDH A.1728@TK2MSFTN GP11.phx.gbl...[color=green]
        > > i am new to windows aplication, i am planning to desing a program which[/color]
        > has[color=green]
        > > login form. i want to use in formation at second form which i used in[/color]
        > login[color=green]
        > > form.
        > >
        > > ex: i filled a dataset in login form how i can use this filled dataset[/color]
        > in[color=green]
        > > the other forms, or i want to use user name in the second form which was
        > > entered at login form
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Cantekin Guneser

          #5
          Re: data passing between windows forms

          can you explain more and send me example

          "William Ryan" <dotnetguru@com cast.nospam.net > wrote in message
          news:OcjdmTOlDH A.3504@TK2MSFTN GP11.phx.gbl...[color=blue]
          > You can create properties of the forms and set them to the dataset or[/color]
          given[color=blue]
          > variable. Or you can create a class with static properties one of which[/color]
          is[color=blue]
          > your dataset. Then you can reference it from anywhere.
          >
          > HTH,
          >
          > Bill
          > "Cantekin Guneser" <cantekingunese r@hotmail.com> wrote in message
          > news:OP6vYNOlDH A.1728@TK2MSFTN GP11.phx.gbl...[color=green]
          > > i am new to windows aplication, i am planning to desing a program which[/color]
          > has[color=green]
          > > login form. i want to use in formation at second form which i used in[/color]
          > login[color=green]
          > > form.
          > >
          > > ex: i filled a dataset in login form how i can use this filled dataset[/color]
          > in[color=green]
          > > the other forms, or i want to use user name in the second form which was
          > > entered at login form
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...