Appearance of some controls differ...

Add-in Express™ Support Service
That's what is more important than anything else

Appearance of some controls differ...
Appearance of Form controls differs... 
HeadOffice




Posts: 13
Joined: 2006-05-04
I have created an add-in for Outlook 2003 which displays a dialog box.
In the designer of VS2003 group boxes have rounded corners (as one example) as do the group boxes in Outlook.

However, when my dialog box (and only my dialog box) appears, it has an old Windows 2000 look - yet the rest of my Windows and Office apps all have the XP look.

Am I missing anything here?
Posted 21 May, 2006 21:43:09 Top
HeadOffice




Posts: 13
Joined: 2006-05-04
I just checked and lo and behold!! If I create a standard C# windows app it all looks fine.
It's something to do with creating an add-in.

Does anyone have any suggestions?

Anyone?
Posted 21 May, 2006 21:48:57 Top
HeadOffice




Posts: 13
Joined: 2006-05-04
Anyone?
Posted 22 May, 2006 12:21:10 Top
Sergey Grischenko


Add-in Express team


Posts: 7235
Joined: 2004-07-05
Hi Peter.

You need to use the XPThemes class to enable XP themes for add-ins written under .NET Framework v1.1.
E.g.
private void adxCommandBarButton1_Click(object sender)
{
using(AddinExpress.MSO.XPThemes.Enable)
{
Form1 f = new Form1();
f.ShowDialog();
f.Dispose();
}
}
Don't forget to set the 'FlatStyle' property of controls to 'System'.
Posted 22 May, 2006 13:35:50 Top