FillColor in Visual Basic .NET

  • Thread starter Wouter van Teijlingen
  • Start date
W

Wouter van Teijlingen

Dear readers,

Recently i have discovered a old VB 6.0 program that's doing some
traffic simulation. Although the upgrade wizard from VB .NET has done
some great work, i still have a problem. When i try to build the
program, i get the following message/error:

'FillColor' is not a member of 'System.Windows.Forms.Label
The code:
Shape17.FillColor = &HFF00

Well, that's true. FillColor is not a part of the VB .NET library's. I
searched on the whole Internet and i have found a _lot_ of information
about it. The Microsoft site even provided me with some info, but i
don't know how to use this 'replacements' from VB .NET.

So my questions is very simple, what can i use instead of FillColor in
my program?

Thanks in advance,

Wouter van Teijlingen
The Netherlands
 
M

Mike McIntyre [MVP]

If you are trying to provide a background color for the Label set the
BackgroundColor property of the .NET Label control.

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
 
W

Wouter van Teijlingen

Mike said:
If you are trying to provide a background color for the Label set the
BackgroundColor property of the .NET Label control.

Well, to be honoust, i don't know exactly if FillColor is the same as
background color. This is because FillColor uses other types of values
to define a color.

Thanks,

Wouter van Teijlingen
The Netherlands
 
H

Herfried K. Wagner [MVP]

Wouter van Teijlingen said:
Well, to be honoust, i don't know exactly if FillColor is the same as
background color. This is because FillColor uses other types of values to
define a color.

There is no 1:1 replacement for VB6's shape control in VB.NET. You may want
to override the form's 'OnPaint' method and draw the shapes there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top