Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SET COLOR PROBLEM

Posted on 2013-06-22
5
Medium Priority
?
318 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

730 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