Call WinForm with parameter?

D

dw

Hello..is it possible to call a winform (show or
showdialog) and pass the form a parameter? Could be a
single value (like an integer)?

thanks for any help or links.
,dw
 
H

Herfried K. Wagner

Hello,

dw said:
Hello..is it possible to call a winform (show or
showdialog) and pass the form a parameter? Could be a
single value (like an integer)?

\\\
Public Overloads Function ShowDialog(ByVal i As Integer) As DialogResult
Me.Text = i.ToString()
Return Me.ShowDialog()
End Function
///

Regards,
Herfried K. Wagner
 
O

og

is there a reason you are specifically sending this to
either a show or showdialog method? why not pass the
parameter to the form in the form's constructor
(overloading it of course)?
 

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