Thanks guys!!!
Code:
#Compile Exe #Option Version4 #Register None #Include "Win32api.inc" #Include "comdlg32.inc" Declare Function SelectColor(ByVal hParent As Long, ByVal iStartColor As Long, ByVal iUseExt As Long) As Long Function PbMain() As Long Local lResult As Long lResult = SelectColor(0,Val("&h" & "FD35FB"),1) MsgBox "#" & Hex$(lResult) End Function Function SelectColor(ByVal hParent As Long, ByVal iStartColor As Long, ByVal iUseExt As Long) As Long Local cca As ChooseColorApi Dim ccTemp(16) As Static Dword cca.hinstance = 0 cca.lStructSize = SizeOf(cca) cca.lpCustColors = VarPtr(ccTemp(0)) '<-- !! cca.Flags = %CC_RGBINIT Or %CC_FULLOPEN Or %CC_ANYCOLOR If iUseExt = 0 Then cca.Flags = cca.Flags Or %CC_PREVENTFULLOPEN cca.hwndowner = hParent cca.rgbResult = iStartColor If ChooseColor(cca) Then Function = cca.rgbResult End Function
Scott
Leave a comment: