Adding PictureBoxes during runtime (vb .net 2003)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TWFyaW8=?=

    #1

    Adding PictureBoxes during runtime (vb .net 2003)

    hi,

    i would like to add pictureboxes during runtime, but there should not be a
    specific variable for each picturebox becouse i don't know how much it will
    be. so i declared a collection referencing on one var declared as picturebox.
    it works fine to add the controls this way. now i would like to implement one
    picturebox click handle for each added picturebox and i have no idea how to
    do this.

    Friend WithEvents Device As PictureBox
    Dim Devices As New Collection
    .....
    Device = New PictureBox
    Devices.Add(Dev ice, DeviceID)
    Me.Controls.Add (Devices(Device ID))
    ....

  • Patrick Steele

    #2
    Re: Adding PictureBoxes during runtime (vb .net 2003)

    In article <716F886F-69C7-4AFD-843F-EF6783AFF807@mi crosoft.com>,
    Mario@discussio ns.microsoft.co m says...
    now i would like to implement one
    picturebox click handle for each added picturebox and i have no idea how to
    do this.
    See the "AddHandler " statement.

    --
    Patrick Steele

    Comment

    Working...