Error

J

Justin

I downloaded some coed and got this one warning message. How do I
correct it

The code fragment

<Category("Progress Bar"), _
Description("Progress Bar Border Style.")> _
Public Property BorderStyle() As BorderStyle
Get
Return pnlBar.BorderStyle
End Get
Set(ByVal Value As BorderStyle)
pnlBar.BorderStyle = Value
End Set
End Property



The error message

property 'BorderStyle' shadows an overloadable member declared in the
base class 'UserControl'. If you want to overload the base method,
this method must be declared 'Overloads'. c:\My
Documents\Microsoft Visual
Basic\DIMo.Net\Progress_Bar_Control\Progress_Bar\UserControl1.vb
 
A

Armin Zingler

I downloaded some coed and got this one warning message. How do I
correct it

The code fragment

<Category("Progress Bar"), _
Description("Progress Bar Border Style.")> _
Public Property BorderStyle() As BorderStyle
Get
Return pnlBar.BorderStyle
End Get
Set(ByVal Value As BorderStyle)
pnlBar.BorderStyle = Value
End Set
End Property



The error message

property 'BorderStyle' shadows an overloadable member declared in
the base class 'UserControl'. If you want to overload the base
method, this method must be declared 'Overloads'. c:\My
Documents\Microsoft Visual
Basic\DIMo.Net\Progress_Bar_Control\Progress_Bar\UserControl1.vb

As the message says the method must be declared 'Overloads':

Public Overloads Property BorderStyle() As BorderStyle


Armin
 

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