Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2004

Tip: Looking for answers? Try searching our database.

error C2039

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel Wilson - 13 Sep 2004 16:53 GMT
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
Daniel Wilson - 13 Sep 2004 21:03 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.