samedi 9 janvier 2016

Creating a custom ImageList class with extended image property

Vote count: 0

I would like to replace my existing ImageLists with custom imagelists.

I am trying to make my class compatible with the .NET ImageList so that I don't have to change much code.

            Using g As Graphics = Graphics.FromImage(SomeBitmap)
                g.DrawImage(il.Images(myIndex), 0, 0, 256, 256)
            End Using

The error I'm getting is "There is no overloads for this function.".

I do understand this error, but I wonder if I could perhaps extend the Graphics to accept my clsImageItem.

This is its code:

Public Class clsImageItem

    Public ReadOnly Property [Image] As Image
    Private _sGUID As String

    Public Sub New(uImage As Image, uGUID As String)

        Image = uImage
        _sGUID = uGUID

    End Sub

End Class

asked 1 min ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



Creating a custom ImageList class with extended image property

1 commentaire:

  1. Are you looking to make money from your websites or blogs by using popunder advertisments?
    In case you do, have you ever used Pop Cash?

    RépondreSupprimer