Solved

SET COLOR PROBLEM

Posted on 2013-06-22
5
311 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
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

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

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 74

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now