|
-
Jul 25th, 2004, 08:41 PM
#1
Thread Starter
Addicted Member
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
-
Jul 26th, 2004, 01:25 AM
#2
Sleep mode
Can you explain a little more about your problem !
-
Jul 26th, 2004, 02:50 AM
#3
Thread Starter
Addicted Member
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....
-
Jul 26th, 2004, 02:59 AM
#4
Hyperactive Member
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!
Live long and prosper (Mr. Spock)
-
Jul 26th, 2004, 05:33 AM
#5
PowerPoster
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.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jul 26th, 2004, 08:05 PM
#6
Thread Starter
Addicted Member
Because the error says .ShowDialog() unsupported type of member
-
Jul 27th, 2004, 02:26 AM
#7
Hyperactive Member
Just a doubt: Have you this error at runtime, or during compilation?
Then...how you declare your 'cf2'.
I'm not sure to be able to help you, but.....!
Live long and prosper (Mr. Spock)
-
Jul 27th, 2004, 04:23 AM
#8
PowerPoster
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.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|