-
Show and ShowDialog
Why is it that I cant use ShowDialog()
Use of unsupported member 'valuetype System.Windows.Forms.DialogResult System.Windows.Forms.Form::ShowDialog()'
If DatePicker1.Value >= DateTime.Today Then
cf2.TextBox1.Text = CStr(DatePicker1.Value)
'cf2.Refresh()
cf2.ShowDialog()
Me.Hide()
End If
-
Can you explain a little more about your problem !
-
meaning...
i got this cf2 which i Dim cf2 as new form2
but when I try to use cf2.showdialog(), it give me the error stated as above...
but when I try to use cf2.show(), it works perfectly well, so I'm wondering what is going on....
-
I've not understood where exactly that error occurs. Debugger has very strange habits when is managing modal form. Often it point to 'ShowDialog' line also when the problem is in the code of the form (cf2). So, you have to follow, step by step, your code and discover where error really occurs, then it will be easier to solve it...I hope!
-
Hi,
The problem is NOT in your posted code. That works perfectly for me, with both Show() and ShowDialog().
Use breakpoints in your code to pinpoint the actual location of the error.
-
Because the error says .ShowDialog() unsupported type of member
-
Just a doubt: Have you this error at runtime, or during compilation? :confused:
Then...how you declare your 'cf2'.
I'm not sure to be able to help you, but.....!:rolleyes:
-
Hi,
Have you messed arround with the event handler in the cf2's closing event?
If that is OK I suggest you reinstall VB.NET.