Link to home
Start Free TrialLog in
Avatar of emi_sastra
emi_sastra

asked on

SET COLOR PROBLEM

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.
Avatar of Brendan M
Brendan M
Flag of Australia image

have you got the
System.Drawing
namespace included?
Add:

Imports System.Drawing

...to the top of your code file.
Avatar of emi_sastra
emi_sastra

ASKER

Hi All,

I've already Imports System.Drawing.

The problem still exist.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.