|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
A form that returns a valueI'm creating a wizard and I've got multiple paths a user can go through
and multiple forms depending on the options they choose on each form. Is it possible to have a form return a value, much like a function? For example: Dim Step1 As New frmStep1 FileType = Step1.ShowDialog .... or even passing values by reference: Dim Step1 As New frmStep1(FileType, FileName) Step1.ShowDialog() Dustin Davis wrote:
Show quoteHide quote > I'm creating a wizard and I've got multiple paths a user can go through Just add them as properties to the form. Then you can reference them> and multiple forms depending on the options they choose on each form. > > Is it possible to have a form return a value, much like a function? > > For example: > > Dim Step1 As New frmStep1 > FileType = Step1.ShowDialog > > ... or even passing values by reference: > > Dim Step1 As New frmStep1(FileType, FileName) > Step1.ShowDialog() like this: Dim Step1 As New frmStep1 Step1.ShowDialog FileType = Step1.FileType FileName = Step1.FileName HTH -- Tom Shelton [MVP] Tom Shelton wrote:
Show quoteHide quote > Dustin Davis wrote: Oh, wow, so simple :blush: - Thanks!>> I'm creating a wizard and I've got multiple paths a user can go through >> and multiple forms depending on the options they choose on each form. >> >> Is it possible to have a form return a value, much like a function? >> >> For example: >> >> Dim Step1 As New frmStep1 >> FileType = Step1.ShowDialog >> >> ... or even passing values by reference: >> >> Dim Step1 As New frmStep1(FileType, FileName) >> Step1.ShowDialog() > > Just add them as properties to the form. Then you can reference them > like this: > > Dim Step1 As New frmStep1 > Step1.ShowDialog > FileType = Step1.FileType > FileName = Step1.FileName > > HTH > > -- > Tom Shelton [MVP] > Dustin
Try catch and Resume
Installer Project - Conditions on Custom Action How to "append" a datatable? Adobe acrobat doesn't close my files? Running program in VB.NET doesn't work? Creating a Help System Regular expression help... Read-only collection... Content of Datagridview to Excel One line of code not working : susposed to resize datagrid column.. |
|||||||||||||||||||||||