Help PLs with converting controls

  • Thread starter Michael Persaud
  • Start date
M

Michael Persaud

Im trying to have an image presented from a sql db and im trying to bring it to my web page into a panel


Private Sub AddImage(ByVal id As Integer, ByVal name As String, ByVal image As System.Drawing.Image)

'create a new, blank ImageListItem
Dim item As New ImageListItem

'use the ImageListItem's properties to store name, id, and image
item.Tag = id
item.Text = name
item.Thumbnail = image

'place the ImageListItem within the panel
item.Location = New Point(0, nextImageY)

'push our "next one goes here" integer down by the height of the item
nextImageY += item.Height

'size the item to the internal panel width and then anchor it
item.Width = leftpanel.Width.Value
item.Anchor = AnchorStyles.Left Or AnchorStyles.Top Or AnchorStyles.Right


'make the ImageListItem appear within the left panel

leftpanel.Controls.Add(item)

End Sub


I cant seem to get this to work without an error of "ImageListItem cannot be converted to system.ui.controls"


Can some one pls tell me how to make the control work

Thanks
MP

Is there any way to convert a system.windows.forms.control.controlCollection to system.ui.controls
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top