|
-
Nov 25th, 2003, 06:57 AM
#1
Thread Starter
Fanatic Member
Forms from 6.0 to .Net
I have prepared a project in VB 6.0. Later on I upgraded it to VB .Net.
To call a form, the code 'MyForm1.show' was upgraded to 'MyForm1.DefInstance.Show()'. Now I added a new form in my .Net project.
My question is how to call the newly added form in the project. Because MyNewForm.Show or MyNewForm.DefInstance.Show method is not available.
Pls guide.
Regards,
Prakash
-
Nov 25th, 2003, 08:26 AM
#2
Lively Member
-
Nov 25th, 2003, 08:51 AM
#3
Thread Starter
Fanatic Member
-
Nov 25th, 2003, 12:00 PM
#4
Addicted Member
You need to create an instance of your new form,
VB Code:
Dim f As New MyNewForm
f.show
-
Nov 26th, 2003, 05:09 AM
#5
Hyperactive Member
Hi
There is nothing to do with MDI.
In VB .NET , you need to always create an instance for that.
So , please do something like this
Dim frmnew as new FORM2
frmnew.show 'non modal
OR
frmnew.showDialogue ' modal
-
Nov 26th, 2003, 08:47 AM
#6
Lively Member
yes, there's some diference, in MDI you have to declare the form's parent, if not when you minimize the MDI, the new form will show on the desktop.
so ...
dim f as new MyForm
f.parent=Mymdi ' ( Me )
f.show
-
Nov 26th, 2003, 11:10 AM
#7
Hyperactive Member
Thanks a lot . I totally overlooked that point
-
Nov 27th, 2003, 07:23 AM
#8
Hyperactive Member
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
|