473,394 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

System.Windows.Forms.VisualStyles Error.

Whenever I have "using System.Windows.Forms.VisualStyles" in any
project, VS2005 tells me that "'VisualStyles' does not exist in the
namespace 'System.Windows.Forms.' Any idea what this might be? Thanks.

Jun 11 '06 #1
7 2028
Is is possible that .net 2.0 isn't being used? In Eclipse you can pick
which version of Java you want to compile in. Does VS2005 have an
option like this? Thanks.

to********@gmail.com wrote:
Whenever I have "using System.Windows.Forms.VisualStyles" in any
project, VS2005 tells me that "'VisualStyles' does not exist in the
namespace 'System.Windows.Forms.' Any idea what this might be? Thanks.


Jun 12 '06 #2
<to********@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
Is is possible that .net 2.0 isn't being used? In Eclipse you can pick
which version of Java you want to compile in. Does VS2005 have an
option like this? Thanks.
No it doesn't. VS 2005 uses .NET 2.0

to********@gmail.com wrote:
Whenever I have "using System.Windows.Forms.VisualStyles" in any
project, VS2005 tells me that "'VisualStyles' does not exist in the
namespace 'System.Windows.Forms.' Any idea what this might be? Thanks.


The problem is exactly what the compiler tells you. VisualStyles does not
exist in System.Windows.Forms. I checked the docs for both 1.1 and 2.0 and
there is no VisualStyles thing anywhere. Where did you find this class (or
whatever it is)?
/claes
Jun 13 '06 #3
Yes there is; it's a namespace, not a class, and is in 2.0 of
system.windows.forms.dll;

So: there are a few questions:
1: does the project reference windows forms?
2: if it does, does it reference version 2.0?
3: what is the exact line of code that is failing
Jun 13 '06 #4
Is the next version of VS going to break all existing code ?

Marc Gravell wrote:
Yes there is; it's a namespace, not a class, and is in 2.0 of
system.windows.forms.dll;

So: there are a few questions:
1: does the project reference windows forms?
2: if it does, does it reference version 2.0?
3: what is the exact line of code that is failing

Jun 13 '06 #5
I removed all the references and added them again. That seems to have
taken care of the VisualStyles error. But now I get this:
http://upload.enetation.co.uk/uploads/0030770376.jpg

I think I'm just tired now and I should just recheck my code with a
clear head. But if you have any suggestions, or know what these new
errors are, please don't hesitate to say. Thanks.
Marc Gravell wrote:
Yes there is; it's a namespace, not a class, and is in 2.0 of
system.windows.forms.dll;

So: there are a few questions:
1: does the project reference windows forms?
2: if it does, does it reference version 2.0?
3: what is the exact line of code that is failing


Jun 14 '06 #6
Erm... /probably/ no? (not normally, at least... a few rare exceptions)

The new classes and namespaces are precisely that: new. Hence "all existing
code" won't be using them, so most things should compile and run just fine.
If you don't want 'em, don't use 'em. Of course, it will be tricky to
support a single product in 1.1 and 2.0 flavours without /seriously/
fragmenting the code base (or limiting yourself to the 1.1 classes, which
would be a pity), but that's just life.

Did I misunderstand the question?

Marc
Jun 14 '06 #7
OK; "3" is the clue; I think you have (in the solution) references to both
1.1 and 2.0 versions of windows forms, or perhaps beta and release v2 forms.
"1" and "2" suggest that the code with Main() is referencing 1.1 (normally
this error is because somebody creates a local class called Application, but
the namespace suggests that this isn't the case here).

Very curious that VisualStyles now works, but EnableVisualStyles doesn't; is
this all in the same assembly?

Marc
Jun 14 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert Mayr | last post by:
Hello, i know that this is a bug of the .net framework, when you activate the VisualStyles, so i deactivate this features. But i get sometimes this exception when i call <Form>.ShowDialog (not...
2
by: Raed Sawalha | last post by:
i have a windows form(Main) with listview, when click an item in listview i open other window form (Sub) which generate the selected item from parent window in as treeview items when click any item...
6
by: Chuck | last post by:
I created a VB.net app that opens a current excel workbook, puts some data in it and saves it. This works fine on all XP machines. But I am getting an error on win 98 machines. here a portion...
3
by: Sarah | last post by:
I have a function residing in a module that is doing some file copy and database query operations. This function is called from a regular form under a System.Windows.Forms.Timer control. The...
2
by: Graeme Neath | last post by:
I'm having a very bizarre problem. I have a vb.net application which uses the ESRI MapObjects 2.2 component (unmanaged code). When I use the MapObjects built-in function 'CopyMap' to copy the map...
3
by: ..:: Kevin ::.. | last post by:
Hello, Is it possible to pick up the colour values used in the XP themes from within .net? I am wanting to set the back colour of one of my forms to the light shade of the theme I am using. ...
4
by: Roger Aikin | last post by:
I've converted a VB6 project to VB.Net 2005. (Actually using vstudio pro 2005). I'm on a machine that also has VB6 and Vstudio.net 2003 on it. The project uses Word, Excel, MapPoint and SqlClient...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
by: =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= | last post by:
Hi everybody, I'm working on my application for appr. 2 years and now suddenly I got an System.TypeInitializationException in one of my global modules. The error is thrown at the first call of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.