I recently solved this by putting the following snippet of SWF before
any of the Gtk# initialization stuff:

Forms.Application.EnableVisualStyles ();
Forms.Application.DoEvents ();

This ensured that on the Windows level, the visual style stuff was
enabled properly, which was then picked up by the WIMP theme properly.

Why this is necessary, and why this works without the above code for
*some* applications is *beyond* me, but my only guess is some codepaths
touching Windows API before WIMP is initialized, and others only after?

See if the above helps?

-pete

On Tue, Mar 17, 2009 at 12:55:30AM -0700, Jupe wrote:
> 
> Another confirmation here. Tried all the 2.12 installers. Problem on XP and
> Vista. But not when starting from visual studio.
> Running the same app from bin/Debug does show the problem. Strange. 
> I tried to narrow it down:
> 
> Tried all possible solution you all mentioned, But nothing works in my
> situation.
> 
> I copied gtk-wimp 0.7.0 over the installer and the problem disappeared.
> But the menu's where not drawn correctly where selected/hovered.
> 
> It seems like a problem with detecting if wimp can use the windows theming
> api.
> The strange thing is that it is working within Visual Studio. Enviroment?
> 
> Tomboy is working correctly and that uses the exact same gtk-sharp
> installation.
> Looked through the sourcecode but could not directly find a difference to my
> code.
> Maybe the developers from Tomboy know more?
> 
> Did someone already found a solution?
> 
> 
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Windows-theme-not-applied-tp20758097p22543841.html
> Sent from the Mono - Gtk# mailing list archive at Nabble.com.
> 
> _______________________________________________
> Gtk-sharp-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 

-- 

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to