>Hi Mike . Thanks for your reply.
>I'll play around with that.
>
>Is there a property in .net similar to the Modal propert in VFP.
>i.e. Sometimes I want to call a Modal form and not return control, other times I want to call a form and return to the calling form immediately .
Hi,
That's the main difference between the Form.Show() and Form.ShowDialog() methods (the other of course being that ShowDialog() has a return value)
Regards,
Viv
>
>>>Hi.
>>>I want to call Form2 from Form1 and pass some values back to form1 that are input in Form2.
>>>I'd appreciate any guidance on how to do this in C#
>>>(In VFP I'd use a modal form and have something like This.oCallingForm.Form1Property = Thisform.Fom2property
>>>
>>>Regards,
>>>Gerard
>>
>>Gerard,
>>You should add properties to Form2 to read those properties before you dispose.
>>
>>In Form2, add the following:
>>
>>Private m_ReturnValue As Integer
>>
>>Public ReadOnly Property ReturnValue() As Integer
>> Get
>> Return m_ReturnValue
>> End Get
>>End Property
>>
>>
>>Before you close Form2, assign the value to m_ReturnValue.
>>
>>In Form1:
>>
>>Dim myReturnValue as Integer
>>Dim myForm2 As New Form2
>>
>>myForm2.ShowDialog
>>myReturnValue = myForm2.ReturnValue
>>
>>myForm2.Dispose
>>