vb.net coding

  • Thread starter Thread starter Tonya
  • Start date Start date
T

Tonya

Hi,

Iv just got a quick coding question for vb.net. I have
currently got 10 checkboxes on form2 and a listbox on
form one. what i wanted to do was allow the user to check
any of the checkboxes on form2 and have those that are
selected to be diplayed on the listbox on form1.

how should i go about coding this? As u can tell im new
to all this. :o)
 
Hi,
There are many ways to approach this. One way is to use
the ArrayList collection contained within the
system.collections namespace. I would declare it as
public or friend in a Standard module. Have code in form2
that applies the Add or Remove methods to the arraylist
variable. You can have the code in each individual
checkbox CheckedChanged event. Keep in mind that the
checked property toggles between true and false. Also,
depending on if you close or hide form2 between
activations, you will need to keep the arraylist variable
current to the current settings of the checkbox controls.
In the Activated event of form1, clear the listbox and
reload from the contents of the arraylist variable.

I hope this helps. My email address has only 2 "k"s in
it. Carol
 
Back
Top