- Код: Выделить всё
Dim cc As CHOOSECOLOR, CustomColors() As Byte
cc.lStructSize = Len(cc)
cc.hwndOwner = frmOptions.hWnd
cc.hInstance = App.hInstance
cc.lpCustColors = StrConv(CustomColors, vbUnicode)
cc.flags = 0
If CHOOSECOLOR(cc) <> 0 Then
GetColor = cc.rgbResult
CustomColors = StrConv(cc.lpCustColors, vbFromUnicode)
Else
GetColor = -1
End If