BitmaptoIcon

    <Extension()> _
    Public Function toIcon(ByVal IconFromResources As Bitmap) As Icon

        Dim myIcon As Bitmap = IconFromResources
        Return Icon.FromHandle(myIcon.GetHicon)

    End Function
Example:
  Me.Icon = My.Resources.timer_16_h.toIcon

Description

Convert from bitmap to icon - use resource bitmaps for form icons

Details

  • Author: Polychrome
  • Submitted on: 4/10/2014 2:18:41 AM
  • Language: VB
  • Type: icon
  • Views: 1567

Double click on the code to select all.

 

;