Private Sub Button1_Click(sender As Object, e As EventArgs) Dim i As Integer = 番号 Dim o = Me.Controls(i) 'VB2008でない場合はControl型で '↓処理を書く End Sub
Public Class Form1 Dim a As New Button Dim b As New Form2 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Controls.Add(a) b.Toplevel = False Me.Controls.Add(b) b.Show() End Sub