[Mono-winforms-list] Feedback for System.Windows.Forms.VisualStyles
Jonathan Pobst
monkey at jpobst.com
Wed Jul 19 15:46:38 EDT 2006
I've written an implementation of the VisualStyles namespace for Mono
(MWF 2.0). If anyone is feeling bored and/or adventurous, I'd
appreciate it if they can verify that I've included all the required
patches and that it works for someone other than myself. Obviously,
this API is designed to only work on XP/2003/Vista with Windows Visual
Styles turned on, however it is designed so that any API consumers are
required to check for available functionality before using it, since it
doesn't run on Windows 9X (even on MS).
First you will need this patch for System.Drawing.Graphics (or else you
will get "Object Busy" exceptions):
http://lists.ximian.com/pipermail/mono-devel-list/2006-July/019407.html
Then you will need the attached patch "application.patch" which adds the
Application.RenderWithVisualStyles and Application.VisualStyleState
methods, as well as changes to XPlatUI to expose the themes_enabled
variable.
Finally, you will need to add the classes in the zip file to
System.Windows.Forms.dll.
Once you get everything compiled, you can compile and run the attached
Form1.cs. It will present you with a tree of every defined style part.
Selecting each one will use Windows Visual Styles to draw the style part
as well as query various information about the style part and theme.
If anyone tries this, please let me know how it goes for you.
Thanks!
Jonathan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: application.patch
Url: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20060719/0f9c4b8c/attachment-0002.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: System.Windows.Forms.VisualStyles.zip
Type: application/x-zip-compressed
Size: 60830 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20060719/0f9c4b8c/attachment-0001.bin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Form1.cs
Url: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20060719/0f9c4b8c/attachment-0003.pl
More information about the Mono-winforms-list
mailing list