473,397 Members | 2,116 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,397 software developers and data experts.

error C2039

I have a project that I have upgraded from VC++.Net 2002 to 2003. It worked fine under 2002.

I have solved some of the issues, but now am getting C:\dwilson\StitchViewer\Stitch2Image.cpp(165): error C2039: 'Color' : is not a member of 'System::Drawing::Pen'

Here is the line in question:
p=new System::Drawing::Pen( System::Drawing::Pen::Color::FromArgb(255,255,0));

I am using all of the following:

#using <System.Drawing.DLL>

#using <System.Windows.Forms.DLL>

using namespace System;

using namespace System::Drawing;

using namespace System::Drawing::Drawing2D;

using namespace System::IO;

According to IntelliSense, System::Drawing::Pen::Color does exist. But not according to the compiler. What am I missing?

Thanks.

Daniel Wilson

http://www.embtrak.com Development Team

Nov 17 '05 #1
1 2489
This one's been solved. Color is no longer a class under Pen. It is now directly under Drawing. So the correction is this line:
p=new System::Drawing::Pen( System::Drawing::Color::FromArgb(255,255,0));

dwilson
"Daniel Wilson" <d.******@embtrak.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a project that I have upgraded from VC++.Net 2002 to 2003. It worked fine under 2002.

I have solved some of the issues, but now am getting C:\dwilson\StitchViewer\Stitch2Image.cpp(165): error C2039: 'Color' : is not a member of 'System::Drawing::Pen'

Here is the line in question:
p=new System::Drawing::Pen( System::Drawing::Pen::Color::FromArgb(255,255,0));

I am using all of the following:

#using <System.Drawing.DLL>

#using <System.Windows.Forms.DLL>

using namespace System;

using namespace System::Drawing;

using namespace System::Drawing::Drawing2D;

using namespace System::IO;

According to IntelliSense, System::Drawing::Pen::Color does exist. But not according to the compiler. What am I missing?

Thanks.

Daniel Wilson

http://www.embtrak.com Development Team

Nov 17 '05 #2

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

Similar topics

6
by: M. Faust | last post by:
Hi, after having installed F2PY-2.43.239_1806 I get the following error when trying to run the hello.f example from the /docs directory: f2py.py --fcompiler=compaqv -c -m hello hello.f...
2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
2
by: Bragadiru | last post by:
I tried to use : System::String* outFile = System::IO::Path::GetTempFileName(); but I get this compile error: error C2039: 'GetTempFileNameA' : is not a member of 'System::IO::Path' I found...
0
by: Art | last post by:
I'm getting the subject error message in a new Windows Forms app to retrieve an ImageList. It is a method I've used many times before without a problem. I've triple checked the code - which is...
4
by: mccoyn | last post by:
I have a class exported in a dll that has member variables I wish to access. When I do it I get an error C2039: 'myVar' : is not a member of myClass Here is an example of what my code looks like...
0
by: Shashikiran Prabhakar via .NET 247 | last post by:
(Type your message here) Hi, I am not very conversent in VC++, but the requirement for me is to run a rendering code. However i am encountering the following errors. c:\Program...
0
by: ravikim | last post by:
for te followingcode i am getting the below error: class windows_exception : public sam_test::exception { public: windows_exception(unsigned long error = ::GetLastError()) :...
2
by: Nick | last post by:
I'm learning C++ and ran into a compile error using Visual C++ 2005 Express on the following example program (located at http://www.cplusplus.com/doc/tutorial/templates.html): // template...
4
by: jewel87 | last post by:
Hello, I have a problem in the following code: OutputFile.clear(); OutputFile.seekg(0); The compiler (Visual Studio) gives an error message: error C2039: 'seekg' : is not a member of...
0
by: yyuan168a | last post by:
I'm upgrading a VS2003 project to VS2005 but got bunch of C2039 errors in xutility.h file during compiling: :\Program Files\Microsoft Visual Studio 8\VC\include\xutility(610) : error C2039:...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.