T
T Clancey
Hi all. I've found a small bit of code that allows me to create a bunch of
picture boxes at run time, but I still need an example of how to handle the
controls in code. I need to access the mouse events for each individual
picture and place graphics and text in the boxes. Can anyone help?
Code for creating the boxes follows.
Cheers,
Tull.
For i = 0 To NumbOfPix - 1
Dim PIC As New System.Windows.Forms.PictureBox
PIC.Size = New System.Drawing.Size(20, 20)
PIC.Location = MynewPos
PIC.Name = "PictureBox"
PIC.BackColor = System.Drawing.Color.Black
PIC.Text = i
PIC.ForeColor = Color.Black
MynewPos.Y += 30
Me.Controls.Add(PIC)
Next
picture boxes at run time, but I still need an example of how to handle the
controls in code. I need to access the mouse events for each individual
picture and place graphics and text in the boxes. Can anyone help?
Code for creating the boxes follows.
Cheers,
Tull.
For i = 0 To NumbOfPix - 1
Dim PIC As New System.Windows.Forms.PictureBox
PIC.Size = New System.Drawing.Size(20, 20)
PIC.Location = MynewPos
PIC.Name = "PictureBox"
PIC.BackColor = System.Drawing.Color.Black
PIC.Text = i
PIC.ForeColor = Color.Black
MynewPos.Y += 30
Me.Controls.Add(PIC)
Next