Overload a Form's New method

  • Thread starter Thread starter moondaddy
  • Start date Start date
M

moondaddy

Is it possible to overload a form's New sub procedure? I would like to
allow the form to be called with the normal new method, or allow parameters
to be passed into the new method in other cases.
 
Yes, create extra constructors (i.e. overload the default constructor) in
your form class. You can add as extra constructors that take the extra
parameters and the right one will be called depending on what parameters you
pass.
 
* "moondaddy said:
Is it possible to overload a form's New sub procedure? I would like to
allow the form to be called with the normal new method, or allow parameters
to be passed into the new method in other cases.

What's the problem?

\\\
Public Sub New(ByVal i As Integer)
MyBase.New()
...
End Sub
///
 
Back
Top