How fetch image id from a panal
hi every one,
i am doing on windows application in VB.NET
in this project i store images into sql server, and get image using for loop.
in this for loop i create a picture box and disply the fetched image.
in this picture box created in side a panal.
my problem is "when i click the image i want to get that image's id".
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Ezdehar Noor43 pointsPosted Apr 25, 2006, 1:06 AM EDT
hi i think this code will slove your problem
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Dim i As Integer
For i = 0 To Me.Panel1.Controls.Count - 1
If Me.Panel1.Controls(i).GetType Is GetType(System.Windows.Forms.PictureBox) Then MsgBox(Me.PictureBox1.Name)
Next
End Sub