473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

opening a windows via a windows

hello, i don't know if i'm posting this in the right section .. but heck.

anyhow, is was wondering what code i should use to open a existing form from
an other form.( clicking on a button and then getting the next one, whil
closing the other one.)

thanks in advanced,
Peace.out.
Nov 21 '05 #1
5 811
"angus" <an***@discussions.microsoft.com> schrieb:
anyhow, is was wondering what code i should use to open a existing form
from
an other form.( clicking on a button and then getting the next one, whil
closing the other one.)


\\\
Public Module Program
Public Sub Main()
Dim f As New Form1()
f.Show()
Application.Run()
End Sub
End Module
///

In the project properties, select 'Sub Main' as startup object. Place the
code below in a button's 'Click' event handler:

\\\
Dim f2 As New Form2()
f2.Show()
Me.Close()
///

You can exit the application by calling 'Application.ExitThread'. Take a
look at the 'ApplicationContext' class too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
Angus,

Of course you only have to place in that button event
\\\
Dim frm As New Form2()
frm.ShowDialog(me)
Me.Dispose()
///

I hope this helps?

Cor
Nov 21 '05 #3
"Cor Ligthert" <no************@planet.nl> schrieb:
frm.ShowDialog(me)
Me.Dispose()


I doubt that this is a good idea...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4
Herfried,

I doubt that this is a good idea...

Are you real in doubt of that?

Here the correction.
\\\
Dim frm As New Form2()
frm.ShowDialog(me)
frm.Dispose()
///

:-)

Thanks for the attention.

Cor
Nov 21 '05 #5
well, thanks for those 2, works like a charm ;-)

"Cor Ligthert" wrote:
Herfried,

I doubt that this is a good idea...

Are you real in doubt of that?

Here the correction.
\\\
Dim frm As New Form2()
frm.ShowDialog(me)
frm.Dispose()
///

:-)

Thanks for the attention.

Cor

Nov 21 '05 #6

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

Similar topics

2
by: Dena Leiter | last post by:
I want to send people to a new page using a redirect but I want a new window to open. Is this possible? I've tried this: <meta http-equiv="refresh"...
1
by: Eric Cadwell | last post by:
We're running Load Runner to test a large 1.0 based WinForms application. I'm getting the following exception when opening and closing a form 400 - 450 times. The form contains several controls and...
1
by: Alfons | last post by:
Hello, I have build a program that can do file transferring between a Windows XP computer and a DOS computer via a serial port. The Windows program I have build in C++ with Visual Studio 6.0....
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
9
compman9902
by: compman9902 | last post by:
Hello, and thank toy for reading this post. Thus far, this website has helped me a lot, (I have finally finished my encryptor: "site removed by moderator", go to the downloads link) and I will...
3
by: lopedon | last post by:
I've got a performance issue in Access 2000 running on Windows 2000. Opening a table local to the MDB takes about 1-2 seconds normally. If I log out of the windows profile that is normally used on...
0
by: Jeremy Noring | last post by:
Hi, I have an application that loads various settings from the app.exe.config file. This has worked very well on w2k, XP, and Vista. However, recently I've been troubleshooting an issue on...
3
by: Luke Davis | last post by:
I'm looking for an effective way to open and close TCP ports. Can I do this through Tcpclient? And I know this is a potential security risk, so what kind of permission must the person running...
15
by: anon | last post by:
I have a page where the ASP script create a table of links i.e. 1 = NextPage.asp?Item=1 2 = NextPage.asp?Item=2 etc What I would like to do is open an new window with this link without any...
2
by: John | last post by:
Hi I have a number of forms which open like this; Dim frm1 As frmForm1 = New frmForm1 Dim frm2 As frmForm2 = New frmForm2 Dim frm3 As frmForm3 = New frmForm3 Dim frm4 As frmForm4 = New...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.