Great work

Topics: Developer Forum
Nov 9, 2006 at 8:22 AM
First of all, you have done a great job, the visual aspect of the apps are really awesome.
I wish you keep updating the project becuase I think it has a great potential.

I was playing with the code and I've found some bugs. I belive you are noticed of them, but I would like to help you if it's posible.

Nov 11, 2006 at 11:30 AM
Could you post a list of the bugs you find? Then I can know for sure if I'm aware of them all.

Nov 13, 2006 at 11:06 AM
There is a couple of them. And the fix I have tried.

When youc click the maximize button, the contents doesn't fit the window and the maximize button looks different.
My fix:
Add "args.Handled = true;" below the Send Message
else {
NativeMethods.SendMessage(this.Handle, (int)NativeMethods.WindowMessages.WMSYSCOMMAND, (IntPtr)NativeMethods.SystemCommands.SCMAXIMIZE, (IntPtr)0);
args.Handled = true;

This works for me I don't know exactly why. Same for restore.

"Unable to find Form" in the Properties window of the designer when you expand the Style property.

I use to work with UserControls and the theme controls are designed to work if they are placed in a form. When I place them in a user control, they looks transparent in design time and, in runtime, they don't get the Form style.
I have fixed this creating a themed user control. The code doesn't look good cause I didn't have much time, but it works in runtime. In the designer, the solution would be more complex I belive.

Any way, great job man. And sorry for my unintelligible english.

Nov 13, 2006 at 9:45 PM
Thanks for showing interest in ThemeKit.

I'm interested on your theme user control idea and code if you don't mind me saying so.

I've actually tried this, but to no avail. I just couldn't get the objects to skin to the form. If you have a way to make this work I'd be really interested in the method.

Any help is of course welcome and hopefully it will become better as time goes on.
Nov 16, 2006 at 5:09 PM
I have made no special thing, simply cut and paste from your ThemePanel Control.
The problem was on ControlStyleChanged due to ThemeUserControl or ThemePanel didn't inherits from ThemeControl. The code I wrote looks like that:

//copy and paste from ThemePanel
elements = (ThemeUserControlElements)GetStyle();

//Cascade change the style of the child controls
foreach (Control c in Controls)
ThemeControl tc = c as ThemeControl;
if (tc != null)
tc.Style =;
//ThemeUserControl didn't inherit from ThemeControl
ThemeUserControl tuc = c as ThemeUserControl;
if (tuc != null)
tuc.Style = style;

I suggest that is better to use a interface like IThemControl which has the Style property ¿what do you think?
If you are very interested in the ThemeUserControl code write me to benito.sebe (at) to continue this discussion.

Thanks for your time guys.