Solved

SET COLOR PROBLEM

Posted on 2013-06-22
5
317 Views
Last Modified: 2013-06-23
Hi All,

I have a class to set dgv color.

dgv.RowHeadersDefaultCellStyle.SelectionForeColor = Color.White

I get compile error :

Error      1      'Color' is not declared. It may be inaccessible due to its protection level.       

What's wrong ?

Thank you.
0
Comment
Question by:emi_sastra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:brendanmeyer
ID: 39268834
have you got the
System.Drawing
namespace included?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39268836
Add:

Imports System.Drawing

...to the top of your code file.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39268851
Hi All,

I've already Imports System.Drawing.

The problem still exist.

Thank you.
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39268898
Do you have a reference to System.Drawing.dll in your project?
0
 
LVL 1

Author Closing Comment

by:emi_sastra
ID: 39268975
Hi  kaufmed,

-Do you have a reference to System.Drawing.dll in your project?
No.

Now I have included and problem gone.

Thank you very much for your help.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question