네크
2014.09.29 21:30:36
*: Public Class Form1
Dim mybutton As Button
Dim myText As TextBox
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Width = 400
Me.Height = 210
Me.Text = "실행중 생성된 버튼 이벤트 실행"
For i As Integer = 1 To 5
mybutton = New Button
With mybutton
.Name = "Button" + i.ToString
.Text = "올려보세여"
.Top = 25 * i
.Left = 10
.Width = 100
AddHandler .MouseHover, AddressOf Button_MouseHover
Me.Controls.Add(mybutton)
End With
Next
myText = New TextBox
With myText
.Top = 25
.Left = 150
.Width = 200
.Height = 125
.Multiline = True
.ScrollBars = ScrollBars.Vertical
Me.Controls.Add(myText)
End With
End Sub