 |
| VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1).
** Please don't post code questions here **
For issues specific to a particular language in .NET, please see the other forum categories. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 10th, 2004, 04:31 AM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Windows XP controls
Hello,
i am trying to create a windows form, using windows XP looking-like controls, like buttons displaying a yellow frame when the mouse goes over them. I am using Windows XP and Visual Studio 7. I create a C# Windows Application project and add Windows Forms controls. I can't find properties configuration making the controls look like Windows XP ones(like AutoCAD 2004 controls for instance). I'm not sure if it is up to props.
If someone can give me advise how to achieve my goal i'll be verry thankful.
Alexander Panov
|
|

April 10th, 2004, 05:54 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Alexander
The standard windows controls in .net do not allow for this type of styling. I would suggest a third party control, infragistics do some great controls and are competitively priced, saves a lot of time writing them yourself.
Duncan
|
|

April 10th, 2004, 01:03 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
You would have to create the images yourself in a graphics program like Freehand/Fireworks or Photoshop, but once that is done you can use the "BackGroundImage" property of the button to set the image you want in MouseEnter and MouseLeave events of the button.
J
|
|

April 10th, 2004, 02:18 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
thanks for your answers. I suspected these ways of doing it - using another control library or create the images yourself. What puzzles me though, is that some applications or web pages, when running on Windows XP look one way and another when running on windows 2000 for example. It looks to me like these applications inherit the controls styles from the OS. But the form i create doesn't do that.
Thanks a lot once more.
Alex
|
|

April 10th, 2004, 06:00 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Alex,
You'll need to enable visual styles before your application can use them. Check out the following two MSDN articles for more info:
http://msdn.microsoft.com/library/de...x/cookbook.asp
http://msdn.microsoft.com/library/de...ndowsForms.asp
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Beautiful Ones by Prince and the Revolution (Track 3 from the album: Purple Rain)
|
|

April 11th, 2004, 03:39 AM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'll read the articles Imar. Thank you very much.
Alex
|
|

April 11th, 2004, 03:02 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The articles are exactly what i needed. I done the job. Thanks a lot Imar.
|
|

April 12th, 2004, 05:53 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Note that Version 1.1 of the .NET framework added a new method to the Application object called 'EnableVisualStyles'. You place a call to this method in your Sub Main; it can be used as an alternative to using a manifest as the articles require.
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
|
|

April 12th, 2004, 11:31 AM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well,
it also works, and I find this way of enabling visual styles more appropriate for my case. Thanks a lot Jeff.
Alex
|
|
 |