devxlogo

DrawSystemIcon – Draw a system icon on any device context

DrawSystemIcon – Draw a system icon on any device context

Private Declare Function LoadIconByID Lib "user32" Alias "LoadIconA" (ByVal _    hInstance As Long, ByVal lpIconName As Long) As LongPrivate Declare Function DrawIcon Lib "user32" (ByVal hDC As Long, _    ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As LongEnum SystemIconConstants    IDI_APPLICATION = 32512    IDI_HAND = 32513    IDI_QUESTION = 32514    IDI_EXCLAMATION = 32515    IDI_ASTERISK = 32516    IDI_WINDOWS = 32517End Enum' draw a system icon on the specified device contextSub DrawSystemIcon(ByVal icon As SystemIconConstants, ByVal hDC As Long, _    ByVal x As Long, ByVal y As Long)    Dim hIcon As Long    ' get the handle of the icon    hIcon = LoadIconByID(0, icon)    ' draw it onto the specified device context    DrawIcon hDC, x, y, hIconEnd Sub

See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist