Big InputBox

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

    #1

    Big InputBox

    I need to emulate an input box that is about 3 lines
    taller then the normal. My prompt is running under the
    text box! So I made my own InputBox windows form.

    I want to call my form just like you would an inputbox.
    The problem I am facing is returning the user input after
    they click the OK button.

    Any examples would be greatly appreciated.

    TIA,
    Graham
  • William Ryan

    #2
    Re: Big InputBox

    Declare a Property for each piece of information you want to have returned.

    Then, after calling showdialog, check if DialogResult.OK and if so, then get
    each of the forms properties. On the form, behind the OK button's click
    event, set the properties. When the Dialog is returned after that, the
    calling form will have acccess to each of the properties


    frmDialog f = new frmDialog();
    switch(f.ShowDi alog()){
    case: DialogResult.Ok
    myVariable1 = f.FirstProperty ;
    break;
    myVariable2 = f.SecondPropert y;
    break;

    }

    then, behind the ok button of the Dialog form


    this.FirstPrope rty = textBox1.text;
    this.SecondProp erty = textBox2.text;

    HTH,

    Bill
    "Graham" <sympt0mx@hotma il.com> wrote in message
    news:001d01c390 04$6c484390$a10 1280a@phx.gbl.. .[color=blue]
    > I need to emulate an input box that is about 3 lines
    > taller then the normal. My prompt is running under the
    > text box! So I made my own InputBox windows form.
    >
    > I want to call my form just like you would an inputbox.
    > The problem I am facing is returning the user input after
    > they click the OK button.
    >
    > Any examples would be greatly appreciated.
    >
    > TIA,
    > Graham[/color]


    Comment

    Working...