Skip to content

How fetch image id from a panal

suresh p.s

Asked Apr 24, 2006, 6:10 AM EDT1 answer
Share
LinkedInX
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.

  • +1

    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

    +1