Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Setting color on VB6 cntrl on Task Panel
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting color on VB6 cntrl on Task Panel

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


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: Setting color on VB6 cntrl on Task Panel
    Posted: 21 October 2005 at 8:28am

I added a VB6 CheckBox control to a Task Panel via this statement:

Dim Item As TaskPanelGroupItem
Item.Handle = frmMain.CheckBox1(0).hWnd

I need to be able to update the background color of the CheckBox control based on what the user has set for the Visual Style of the Task Panel control. It seems adding the CheckBox control to the Task Panel group prevents the ability to alter the background color. Even if I set the background color of the CheckBox prior to adding it to the Task Panel group it will "lose" the color and revert back to a default color.

How does one set the background color of a control that has been added to a Task Panel control?

Shawshank

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2005 at 8:00am
Item.BackColor.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2005 at 1:19pm

That doesn't seem to work --at least for setting the background color. It works fine for setting other properties like the .Tag or .Tooltip properties. But for the color property I get an error stating: Wrong number of arguments or invalid property assignment.

Reviewing the help file indicates that the TaskPanelGroupItem back color property can be set/read using the .Backcolor property. Proper value is a Long. A long is what I am passing. The help also states that the property is read only. So which is it, read only or can it be set and read?

Back to Top
kylechen View Drop Down
Groupie
Groupie


Joined: 29 November 2004
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote kylechen Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2005 at 6:38am
Maybe you can try to put a picture box as the container for check box...
Back to Top
basile View Drop Down
Newbie
Newbie
Avatar

Joined: 23 November 2005
Location: Greece
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote basile Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2005 at 4:00am
I had the same problem with the background color of the check box. Place the check box in a picture box and attach the picturebox to task panel item instead. This workaround will solve the problem...
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.109 seconds.