www.pudn.com > Txt-To-Image.rar > modApi.bas, change:2010-05-06,size:653b


Attribute VB_Name = "modApi" 
Option Explicit 
 
Public Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long 
Public Declare Function SetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long 
 
'获得RRGGBB,形式的颜色 
Public Function GetColorFromStr(strValue As String) As Long 
    If Len(strValue) >= 6 Then 
        Dim strHexColor As String 
        strHexColor = "&h" & Mid$(strValue, 5, 2) & Mid$(strValue, 3, 2) & Mid$(strValue, 1, 2) 
        GetColorFromStr = CLng(strHexColor) 
    Else 
        GetColorFromStr = 0 
    End If 
End Function