XP Theme - XP Visual Styles for Portable.NET

Version 0.1 (alpha)

# Portable.NET XP Theme

The XP Theme enables Portable.NET to use Windows XP visual styles for GUI applications using the System.Windows.Forms library. You can always find the newest version of the theme here.

#### Using the theme

The XP theme relies on the UxTheme (User Experience) library and therefore requires a Windows XP or Windows 2003 system.

Copy the System.Windows.Forms.Themes.XP.dll dynamic link library to the lib\cscc\lib folder located in your Portable.NET installation folder. To use the XP theme you must set the FlatStyle property of form controls to System. You will also need to enable Portable.NET to use the XP theme - this can be accomplished in two ways:

- Enable the theme system-wide (i.e. for all applications) by setting the PNET_WINFORMS_THEME environment variable to XP. You can add this variable in "My Computer" properties ("Advanced" tab), or set it temporarily from the command line:

  SET PNET_WINFORMS_THEME = XP

- Enable the theme for each application by specifying the --theme=XP option for ilrun, e.g.:

  ilrun myapp.exe --theme=XP

Bear in mind that if you try to enable the XP theme on systems other than Windows XP or Windows 2003, Portable.NET will fall back to the default theme. On a side note, given the rapid pace of WINE development (as of this writing WINE includes an early implementation of the UxTheme library), it may soon be possible to use this theme on other systems.

#### Building the library

The XP theme engine archive includes build files for CSAnt and Visual Studio.NET 2003. To compile the source code, simply open the project file or execute one of the build scripts provided - build.bat for Windows or build.sh for Linux (or other systems using the Bourne shell).

If you wish to modify or improve the theme engine please read the Theme XP API documentation provided. Please note that at this time the documentation is still incomplete.

#### Online resources

##### Themes and visual styles

- ThemeXP - choose your favourite from a collection of nearly 1400 styles
- XP Skinning - learn more about XP visual styles

##### DotGNU and Portable.NET

- Portable.NET for Windows Forum - discuss and ask questions on Portable.NET for Windows (including the XP theme)
- Portable.NET Homepage - download the source code for the latest versions of Portable.NET and libraries
- DotGNU Project - learn more about DotGNU and its sub-projects, and download the latest software packages
- Compona - extend your applications with professionally designed custom controls and utility libraries

#### Authors and legal information

The XP theme engine was written by Maciek Plewa with invaluable help from Roger Johansson.

Copyright © 2004 by Maciek Plewa
Copyright © 2004 by Nordic Compona Solutions

Portable.NET is Copyright © Southern Storm Pty Ltd

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the licence terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the licence of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Linux is a registered trademark of Linus Torvalds. Microsoft, Windows, Windows XP, Windows 2003 are trademarks or registered trademarks of the Microsoft Corporation. All other trademarks are the property of their respective owners.