如何在FOR语句中设置连续的控件名称?

时间:2013-01-31 01:51:34

标签: vb.net dictionary controls set stopwatch

您好我需要一个代码块来完成以下任务:

我的表格中有一个flolayoutpanel,里面有3个面板。我想要我的提交按钮来计算面板并创建一个以每个面板命名的秒表控件。以下是我到目前为止的情况:

Dim Panels As Integer = FlowLayoutPanel1.Controls.Count
        For i = 1 To Panels 
            Dim StopwatchNumber As Integer = FlowLayoutPanel1.Controls.Count + 1
            Dim Stopwatch As New Stopwatch ' <-- How can I assign the name [Stopwatch1]?
        Next

0 个答案:

没有答案