Private Declare Function APITranslateColor Lib "olepro32.dll" Alias "OleTranslateColor" (ByVal clr As OLE_COLOR, ByVal palet As Long, col As COLORREF) As Long
Private Type COLORREF
Blue As Byte
Green As Byte
Red As Byte
End Type
Private Function TranslateColor(ByVal Color As Long) As Long
Dim REF As COLORREF
APITranslateColor Color, 0, REF
TranslateColor = RGB(REF.Red, REF.Green, REF.Blue)
End Function
Private Sub Form_Load()
Dim RealColor As Long
CommonDialog1.ShowColor
RealColor = TranslateColor(CommonDialog1.Color)
MsgBox Hex$(RealColor)
End
End Sub
By Renfield
[mailto:thomas_reynald@msn.com thomas_reynald@msn.com]
Aucune touche n'a ete blessee lors de la saisie de ce texte.......... ;)