# VB.NET PictureBox.BackColor setting



## tim8w (Nov 9, 2004)

How do I set the PictureBox.BackColor to a non-System.Drawing.Color value?

I'm trying to set the following:


```
MyPictureBox.BackColor = &HC000&
MyPictureBox.BackColor = RGB(255, 255, 0)
```
I get the following error:

Value of type 'Integer' cannot be converted to 'System.Drawing.Color'

If I try the following:


```
MyPictureBox.BackColor.FromArgb(255, 255, 0)
```
I get the following warning:

Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.


----------



## tim8w (Nov 9, 2004)

I found the answer:


```
MyPictureBox.BackColor = Color.FromArgb(255, 255, 0)
```


----------

