Little window

  • Thread starter Thread starter josema
  • Start date Start date
J

josema

Hi,

i have a form, and a button...

My question is that,
I would like that when the user press this button,
show another form with 3 checkboxes and 2 buttons
(accept and cancel). The user will choose for example 2
checkboxes and click in accept, and in my first form
catch the value of the checkboxes selected...

Anybody have something that can help me?
Thanks in advance, happy new year

Josema.
 
Josema,

I would recommend that when you show your second form, you make it
modal. Once you do that, on the second form, make sure that the values from
the checkboxes are made public, either by exposing the checkbox controls as
public, or by exposing properties that expose the checkbox values (the
latter is the preferred way). Once you show the form modally (and the user
closes it), you can choose how you want to proceed based on the values
exposed on the form.

Hope this helps.
 
Create a property for each of the checkbox values in form2. So, you have
three properties Check1, Check2, and Check3 for instance. WHenthe user
makes his selection, set each property respective to the values that the
user chose. Call the form2 from Form1 using ShowDialog and now when the
user hits accept, you can reference form2.Check1, form2.Check2,
form2.Check3.

HTH,

Bill
 
Back
Top