Values in Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcus Vinícius

    #1

    Values in Form

    Good morning

    I have a form in c# (windows form) where the user select the his state. This
    string was put in a public field and a property check it (GET/SET). When the
    user click in OK button in this form, i have a string strEst with his value
    (state). This search for is called to principal form, so the value of strEst
    must be put in principal form, but i can't do it...
    When I show the strEst value in principal form, it is empty...I can't catch
    the serch value selected in serch form...

    See the code please:

    private void btnBuscarEstado _Click(object sender, System.EventArg s e)
    {
    // Call the form references by state
    frmEstado objEstado = new frmEstado();
    objEstado.Show( );

    // Set the value selected in this form
    this.txtEstado. Text = objEstado.strEs t;

    }

    Anybody here can help me?
    --


    -------------------------------------------------
    Marcus Vinícius M. Montezano

    develoepr

    Digiexpress
    -------------------------------------------------



    ---
    E-mail verificado com anti-virus.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.531 / Virus Database: 325 - Release Date: 22/10/2003


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Values in Form

    Marcus,

    The only way this could be happening is if your frmEstado instance was
    not setting the strEst property (or the values that the property uses to
    return a value) correctly. Are you sure you are setting strEst correctly?

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Marcus Vinícius" <marc.marcus@bo l.com.br> wrote in message
    news:%2341MCwun DHA.2628@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    > Good morning
    >
    > I have a form in c# (windows form) where the user select the his state.[/color]
    This[color=blue]
    > string was put in a public field and a property check it (GET/SET). When[/color]
    the[color=blue]
    > user click in OK button in this form, i have a string strEst with his[/color]
    value[color=blue]
    > (state). This search for is called to principal form, so the value of[/color]
    strEst[color=blue]
    > must be put in principal form, but i can't do it...
    > When I show the strEst value in principal form, it is empty...I can't[/color]
    catch[color=blue]
    > the serch value selected in serch form...
    >
    > See the code please:
    >
    > private void btnBuscarEstado _Click(object sender, System.EventArg s e)
    > {
    > // Call the form references by state
    > frmEstado objEstado = new frmEstado();
    > objEstado.Show( );
    >
    > // Set the value selected in this form
    > this.txtEstado. Text = objEstado.strEs t;
    >
    > }
    >
    > Anybody here can help me?
    > --
    >
    >
    > -------------------------------------------------
    > Marcus Vinícius M. Montezano
    >
    > develoepr
    >
    > Digiexpress
    > -------------------------------------------------
    >
    >
    >
    > ---
    > E-mail verificado com anti-virus.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.531 / Virus Database: 325 - Release Date: 22/10/2003
    >
    >[/color]


    Comment

    Working...