error C2039

D

Daniel Wilson

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
 
D

Daniel Wilson

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
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top