M
Maarten
hallow
i have the folowing code to add somme textboxes
comboboxes and checkboxes
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
ControlCount = ControlCount + 1
Dim check As New CheckBox()
check.Name = "checkonoff"
check.Location = New Point(m_Location.X + 150, m_Location.Y - 3)
check.Size = New Size(30, 30)
Controls.Add(check)
Dim combo As New ComboBox()
combo.Text = "1"
combo.Name = "combochan"
combo.Location = New Point(m_Location.X + 180, m_Location.Y)
combo.Size = New Size(60, 20)
For inti = 1 To 16
Select Case dchanState(inti)
Case "Output"
combo.Items.Add(inti)
End Select
Next inti
Controls.Add(combo)
Dim text As New TextBox()
text.Text = "0"
text.Name = "txtvalue"
text.Location = New Point(m_Location.X + 250, m_Location.Y)
text.Size = New Size(70, text.Height)
Controls.Add(text)
m_Location.Y = m_Location.Y + text.Height + 5
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
If Button3.Text = "Start" Then
Button3.Text = "Stop"
Button3.ImageIndex = 8
Timer1.Enabled = True
Timer1.Interval = 1000
ElseIf Button3.Text = "Stop" Then
Button3.Text = "Start"
Button3.ImageIndex = 0
Timer1.Enabled = False
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
'txtvalue.text = txtvalue - 1
End Sub
when i add for example 100 textboxes
how can i make the text of all textboxes countdown per second with 1 timer
something like the above example
i have the folowing code to add somme textboxes
comboboxes and checkboxes
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
ControlCount = ControlCount + 1
Dim check As New CheckBox()
check.Name = "checkonoff"
check.Location = New Point(m_Location.X + 150, m_Location.Y - 3)
check.Size = New Size(30, 30)
Controls.Add(check)
Dim combo As New ComboBox()
combo.Text = "1"
combo.Name = "combochan"
combo.Location = New Point(m_Location.X + 180, m_Location.Y)
combo.Size = New Size(60, 20)
For inti = 1 To 16
Select Case dchanState(inti)
Case "Output"
combo.Items.Add(inti)
End Select
Next inti
Controls.Add(combo)
Dim text As New TextBox()
text.Text = "0"
text.Name = "txtvalue"
text.Location = New Point(m_Location.X + 250, m_Location.Y)
text.Size = New Size(70, text.Height)
Controls.Add(text)
m_Location.Y = m_Location.Y + text.Height + 5
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
If Button3.Text = "Start" Then
Button3.Text = "Stop"
Button3.ImageIndex = 8
Timer1.Enabled = True
Timer1.Interval = 1000
ElseIf Button3.Text = "Stop" Then
Button3.Text = "Start"
Button3.ImageIndex = 0
Timer1.Enabled = False
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
'txtvalue.text = txtvalue - 1
End Sub
when i add for example 100 textboxes
how can i make the text of all textboxes countdown per second with 1 timer
something like the above example