views:

559

answers:

1

Hi!

I have a problem with the style of the button in a messagebox. If I call the following line of code in a current project the button get one type of visual apperance/style. And If I create a new VB.NET Windows Application project it gets a standard Windows apperance/style.

Windows.Forms.MessageBox.Show("Yaay", "Yaay!", Windows.Forms.MessageBoxButtons.OK)

See the difference between the buttons below. I suspect they inherit the visual apperance from it's parent or maybe from some project settings. But I have not been able to find out from where.

Both projects are created in VB.NET 2.0, and both have same System.Windows.Forms - dll as reference (c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll).

Screenshot can be found here.

Thanx in advance for your help!

A: 

I cannot see the image from where I am so I'm not sure if this will help you.

Open the Project Properties for each solution and look at the Application tab.

Is the "Enable Applicaton Framework" item ticked? And if so, is the "Enable XP Visual Styles" item also ticked?

That may the difference in the two solutions.

Chris Dunaway