![]() |
[SOLVED] Colour Picker Control |
Post Reply ![]() |
Author | |
Hemesh ![]() Senior Member ![]() Joined: 10 August 2010 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() Posted: 12 October 2010 at 3:28am |
Is there a way to get the font colour on the colour picker? I like the fact that it picks up the appropriate font colour automatically depending on what colour is picked :)
![]() |
|
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
|
![]() |
|
Hemesh ![]() Senior Member ![]() Joined: 10 August 2010 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
Alternatively... If anyone knows the correct colour number to switch from Black to White, then that'd be just as good :)
|
|
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I don't understand your first post... and maybe second either...
![]() Black = 0
White = 16777215
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Hemesh ![]() Senior Member ![]() Joined: 10 August 2010 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
D'OH, didn't have email notification on...
The CJ Colour picker will change the font colour from black to white when it's a certain darkness of colour. I want to essentially grab the font colour from the picker to use elsewhere but as I can't see how to do that, I think it might be something based on a certain darkness of colour before it changes the font from black to white, and that's what I'm after :) ... unless we can grab the font colour from the colour picker? :D |
|
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
OK, now I know what you mean
![]() I don't see how to get the ForeColor from the ColorPicker control. The font object isn't returning color either. Maybe CJ can shed a light on this
![]() Good luck !
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Hemesh ![]() Senior Member ![]() Joined: 10 August 2010 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
Worked it out now as I got put under pressure to sort it out! Kind of obvious now I think about it
![]() Private Function Get_ForeColour(ByVal lngBackColour As Long) As Long If lngBackColour > RGB(128, 128, 128) Then Get_ForeColour = vbBlack Else Get_ForeColour = vbWhite End If End Function Would be easier to just grab it from the control though... ![]() |
|
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
It sounded almost to good to be true
![]() Try to pick some light green color...
![]() Foreground will be white but the ColorPicker foreground is still black (as it should be)
But in most cases, you are right
![]() |
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
Hemesh ![]() Senior Member ![]() Joined: 10 August 2010 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
D'oh! I knew there'd be somewhere.... come on CJ, show us what the magic number is!
![]() |
|
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |