473,503 Members | 2,238 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show new form?

In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?

Thanks a lot
Nov 20 '05 #1
6 3876
Try the following:
-----------------

Dim objForm as Form2

objForm = New Form2

objForm.Show

---------------

In VB.net you have to explicitly create an instance of the form class. VB6
did this in the background for you.

HTH,

Trev.

"Sven" <f> wrote in message news:OP**************@tk2msftngp13.phx.gbl...
In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?

Thanks a lot

Nov 20 '05 #2
You have to create an instance first:
Dim f As New Form2
f.Show

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Sven" <f> schreef in bericht news:OP**************@tk2msftngp13.phx.gbl...
In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?

Thanks a lot

Nov 20 '05 #3
Yes 2 ways

Form1.show <---- normal show(click anywhere else on screen, form1 goes in background)
Form1.showdialog<----- lock the screen on form1
Nov 20 '05 #4
thanks a lot! sorry for this easy questin I'm new to VB.Net... it's quite
different from VB.NET
"Jan Tielens" <ja*@no.spam.please.leadit.be> schrieb im Newsbeitrag
news:uh**************@TK2MSFTNGP10.phx.gbl...
You have to create an instance first:
Dim f As New Form2
f.Show

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Sven" <f> schreef in bericht

news:OP**************@tk2msftngp13.phx.gbl...
In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?

Thanks a lot


Nov 20 '05 #5
If you need more info:
http://www.devcity.net/net/article.a...=multipleforms

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Sven" <f> schreef in bericht news:eI**************@TK2MSFTNGP10.phx.gbl...
thanks a lot! sorry for this easy questin I'm new to VB.Net... it's quite
different from VB.NET
"Jan Tielens" <ja*@no.spam.please.leadit.be> schrieb im Newsbeitrag
news:uh**************@TK2MSFTNGP10.phx.gbl...
You have to create an instance first:
Dim f As New Form2
f.Show

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Sven" <f> schreef in bericht

news:OP**************@tk2msftngp13.phx.gbl...
In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?

Thanks a lot



Nov 20 '05 #6
* "Sven" <f> scripsit:
In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?


\\\
Call (New Form2()).Show()
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6695
by: dp | last post by:
I am new to VB.NET and I have a simple question. How do I show a form from a command button click event? The code I have below is not working. I am trying to show the form frmAgent. What am I...
13
73970
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
2
2475
by: Ajai Kumar .R | last post by:
Hai all, I've two or more forms on my app. My requirement is, Have to show the first form asa the user press a button have to hide the first form and show the second form. If the user press the...
20
2544
by: WindAndWaves | last post by:
Hi Gurus I was wondering if you can send me in the right direction: I have a table with about 300 rows. I want to make all of them invisible and when a user enters a code in a form then make...
1
11265
by: cefrancke | last post by:
I have set the Startup properties to the following... All menus, toolbars, etc are turned off plus these are unchecked Allow Full Menus Allow Built-in Toolbars Allow Default Shortcut Menus...
0
1579
by: Homa | last post by:
Hi I'm working on a program that will have 3 forms: a main form, a status form and a sub-form. The main form and status form are always appear, and my sub-form is a singleton (for performance...
13
36559
by: Tim Smallwood | last post by:
Hi, This is probably a stupid question, but I can't seem to get a form to show / load? In the older versions of VB I'd use frmMyform.show / load myForm, etc? I looked at the help file and it...
3
4020
by: yzi | last post by:
I have a list form and a detail form . Before, I open the List form, use form.showDialog(),then I click List Item and open the Detail Form by form.show(). now , user need when the list form...
22
3035
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
4
2198
by: Delphiscn | last post by:
How to show a ABOUT Form???????? Hello Everyone: I use C# want to Create a Project. In my project. there are two forms. One is main form, and another is a about form. In the about form there...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.