Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - [SOLVED] Colour Picker Control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Colour Picker Control

 Post Reply Post Reply
Author
Message
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Colour Picker Control
    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 :)

Clap
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0
Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2010 at 5:52am
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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2010 at 3:11am
Hi,
 
I don't understand your first post... and maybe second either... Wink
 
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....
Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2010 at 11:12am
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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2010 at 1:54pm
Hi,
 
OK, now I know what you mean LOL
 
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 Wink Would be nice though if a label or text automatically changes the forecolor when selecting a dark color from ColorPicker.
 
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....
Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2010 at 3:33am
Worked it out now as I got put under pressure to sort it out! Kind of obvious now I think about it LOL..

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... Wink... put in the option CJ :)
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2010 at 4:04am
Hi,
 
It sounded almost to good to be true Wink
 
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 Wink
 
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....
Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2010 at 4:06am
D'oh! I knew there'd be somewhere.... come on CJ, show us what the magic number is! Thumbs Up
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.