Print Page | Close Window

Setting color on VB6 cntrl on Task Panel

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3074
Printed Date: 17 November 2024 at 11:17am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting color on VB6 cntrl on Task Panel
Posted By: Shawshank
Subject: Setting color on VB6 cntrl on Task Panel
Date 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




Replies:
Posted By: Oleg
Date Posted: 27 October 2005 at 8:00am
Item.BackColor.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Shawshank
Date 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?



Posted By: kylechen
Date Posted: 22 November 2005 at 6:38am
Maybe you can try to put a picture box as the container for check box...


Posted By: basile
Date 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...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net