The only time I've ran into this was when I was working on a Console application that was eventually ported up to a windows form application. I suspect that somewhere along the way the project did not have the "ENABLE VISUAL STYLES" option under project properties because it was originally a console app.
The way that I corrected this was to just recreate the solution [edit] & project file
from scratch[/edit] and add in the exsiting code. Also, make sure that any time you do a build that has had massive code changes, always Clean, and Rebuild the solution.
[additonal]
I pulled up and older VB project and did some searching around and in the Application.Designer and found the following code.
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New( _
Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
I managed to recreate and restore a similar-acting issue by manipulating the properties below directly in the file and also through the IDE. After a few edits I eventually confused it.
Me.SaveMySettingsOnExit = true
Me.EnableVisualStyles = true
The only thing I can think of that would cause a similar behavior that I did would be source-control check-ins check-outs.
[/additional]
Hope this helps,
-Artificer GM