Is there an API function to load cursor from png file, like CreateIconFromFile?
how to png to ico,ico to png by vb6 code?-VBForums
https://www.vbforums.com/showthread....ng-by-vb6-code
[RESOLVED] saving pictures to ico-VBForums
https://www.vbforums.com/showthread....ictures-to-ico
how to png to ico,ico to png by vb6 code?-VBForums
https://www.vbforums.com/showthread....ng-by-vb6-code
[RESOLVED] saving pictures to ico-VBForums
https://www.vbforums.com/showthread....ictures-to-ico
Code:
Private Declare Function CreateIconFromResourceEx Lib "user32" ( _
ByRef IconBits As Byte, _
ByVal cbIconBits As Long, _
ByVal fIcon As Long, _
ByVal dwVersion As Long, _
ByVal cxDesired As Long, _
ByVal cyDesired As Long, _
ByVal uFlags As Long) As Long
Bytes = OpenBinFile(Png1)
hIcon = CreateIconFromResourceEx(Bytes(0), UBound(Bytes) + 1, WIN32_TRUE, &H30000, 0, 0, LR_DEFAULTCOLOR)
Function OpenBinFile(filename As String, Optional ErrInfo As String) As Byte()
'[mycode_id:1903],edittime:2011/7/11 13:27:34
On Error Resume Next
Dim hFile As Integer
hFile = FreeFile
Open filename For Binary As #hFile
ReDim OpenBinFile(LOF(hFile) - 1)
Get #hFile, , OpenBinFile
Close #hFile
End Function