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
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