Question

I'm currently working on a plug-in dll for a 3rd party application. Part of my dll includes a pop-up window with a System.Windows.Forms.MonthCalendar in it. Now when I work on it in Visual Studio and when I open the pop-up with a test application I wrote it looks one way, but when the 3rd party app opens it, it looks different. On top of looking different they also have different behaviors. Does anyone have any idea why? One thing that I thought might be an issue is that my dll is built with .Net 3.5 and the 3rd party app is .Net 2.0 (I think). But when I built my test application as .Net 2.0 it still worked the same way.

Here's what I'm expecting:

alt text

And here's what I'm getting:

alt text

Was it helpful?

Solution

The 3rd-party application is not enabling visual styles, and is therefore falling back on the classic Windows UI theme. Note that the button and combo boxes don't look the same either. You would have to enable visual styles in the 3rd-party application to apply the current Windows theme to it.

(As an exercise, try switching your Windows preferences to use the classic theme and then look at the working test application -- it should look identical to the 3rd-party one.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top