G
Guest
Hey guys, i have 5 buttons created on runtime, in vb 6.0, each button had a unique index, how is done in vb.net? bellow is the code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
Dim i As Integer =
Dim myPic(10) as pictureBo
Dim yAxis As Integer =
For i = 0 To
MyPic(i) = New PictureBo
MyPic(i).Width = 13
MyPic(i).Height = 4
'Mypic(i).Font = New Font("Verdana", 9.75!, FontStyle.Regular
MyPic(i).BackColor = Drawing.Color.Blac
MyPic(i).SizeMode = PictureBoxSizeMode.StretchImag
MyPic(i).Location = New System.Drawing.Point(Left, Top
MyPic(i).Name = "Pic" &
'Mypic(i).Text = rst("ProductName").Valu
MyPic(i).Location = New Point(660, yAxis
MyPic(i).Cursor = Cursors.Han
MyPic(i).BringToFront(
Me.Controls.Add(MyPic(i)
MyPic(i).Image = ImageList1.Images.Item(i
AddHandler MyPic(i).Click, AddressOf mypic_clic
yAxis = yAxis + 5 + MyPic(i).Heigh
Nex
End Su
NEED THE CODE PLEAS
THANX IN ADVANCE
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
Dim i As Integer =
Dim myPic(10) as pictureBo
Dim yAxis As Integer =
For i = 0 To
MyPic(i) = New PictureBo
MyPic(i).Width = 13
MyPic(i).Height = 4
'Mypic(i).Font = New Font("Verdana", 9.75!, FontStyle.Regular
MyPic(i).BackColor = Drawing.Color.Blac
MyPic(i).SizeMode = PictureBoxSizeMode.StretchImag
MyPic(i).Location = New System.Drawing.Point(Left, Top
MyPic(i).Name = "Pic" &
'Mypic(i).Text = rst("ProductName").Valu
MyPic(i).Location = New Point(660, yAxis
MyPic(i).Cursor = Cursors.Han
MyPic(i).BringToFront(
Me.Controls.Add(MyPic(i)
MyPic(i).Image = ImageList1.Images.Item(i
AddHandler MyPic(i).Click, AddressOf mypic_clic
yAxis = yAxis + 5 + MyPic(i).Heigh
Nex
End Su
NEED THE CODE PLEAS
THANX IN ADVANCE