Skip to main content

Problem:

Only, if the XP style (Visual style) is enabled on a Vista or XP windows:

When Visual Studio is used to create a WinForms application, the painter shows the objects like push button in Visual XP style, e.g. with round edges.

When running the application, the old standard style is used.

Resolution:

The Visual Style has to be enabled, e.g. by adding an invoke to "EnableVisualStyles" in the "main" method of the application:

           set mainForm to Class-Main-Form::"New"()

           invoke S-Windows-Forms-Application::"EnableVisualStyles"     *> added

           invoke S-Windows-Forms-Application::"Run"(mainForm)

Old KB# 1598