lekner

lekner

  • NA
  • 12
  • 0

creating on_click method

Jan 6 2005 5:15 AM
hello my friends i have a problem that i didnt solve yet what my program is doing is to get some data on text boxes and comboboxes from the user and calculating the voltage loss,short current, on an electric cable i having an arrey of textboxes and buttons. one line is loadind on form load and then i have an add more lines button that way the user can calculate more then one line at the time. please help me. the add button method is Dim i, number As Integer number = InputBox("number of lines?") ' this is a calculate button For i = 2 To number Dim calculate(number) As Button calculate(number) = New Button calculate(number).Text = Button1.Text calculate(number).Size = Button1.Size calculate(number).Location = New Point(48, (i * 20 + 88) - 20) Me.Controls.Add(calculate(number)) Next i have the same thing for my textboxes 9 of then how i create an on_click method for those virtual buttons the original button on the form and the textboxes are working perfect or how i copy the on_click method from the first button that workin on the form. please help me thank you ofer

Answers (1)