473,394 Members | 1,715 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,394 software developers and data experts.

.NET / Windows App, Multiple Forms / Windows...



Hey guys, really dumb question here... I've been doing all of my development
in the past few years as web applications. Therefore, if I need a new window
or form, I simply have it go to another page. I haven't written a Visual C++
or VB (or Delphi) application in at least 4 years and for the life of me, I
don't remember how to go from one window to the next. What I mean is, lets
say I have a main menu with buttons on it. Someone clicks one of the buttons,
I want the main window to dissapear and the new window (with new options) to
open. I know each window is a "form.cs"... how do I make that "call" to tell
the new window to open. I'm assuming of course I don't automatically just
OPEN all the forms at the same time and just hide them.

I know this is really lame, but any help would be appreciated.

Thanks!!!

Todd

Jun 27 '08 #1
4 1108
In the "handler" use ...

frmAbout frm = new frmAbout();
frm.Show();

.... to display the frm with the name frmAbout.

.... Thom
__________________________________________________ _
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
Jun 27 '08 #2
Or try ShowDialog()
Jun 27 '08 #3
The first time I use ...
ShowDalog( frmAbout( ) );
.... from a MDI form it throws an error with ...
Additional information: Form that is already visible cannot be displayed as
a modal dialog box. Set the form's visible property to false before calling
showDialog.

If I instead use ...
frmAbout frm = new frmAbout();
frm.Show();
.... it succeeds.

Suggestion?

.... Thom
__________________________________________________ _
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
Jun 27 '08 #4

Thanks guys! I appreciate the responses!
Jun 27 '08 #5

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

Similar topics

2
by: Woof-Woof | last post by:
I have a problem with windows in my VB projects. My project consists of an MDI form with many child (MDIChild = TRUE) and non-child (MDIChild = FALSE) forms contained within. The problem I...
5
by: Matthew Fitzpatrick | last post by:
when multiple similar forms are opened up, windows xp can group them into an application group button on the start bar. Unfortunately, this application group uses the icon of the application's...
0
by: Sinisa | last post by:
I have a Windows form which has multiple groups of the same window controls. I wanted to create a control class that has the standard controls in one. something like: public class Sensor :...
5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
5
by: Rajat Tandon | last post by:
Hello Everybody, Please guide me so that I can fulfill this challenging assisnment ... I have been asked to "Restructure a Windows application" from scratch in 2 months. The existing...
2
by: John Granade | last post by:
I'm looking for the best way to make a dataset available from multiple Windows forms. The dataset is created from an XML file. I have a main form (frmMain) that loads the dataset and reads the...
1
by: Asad | last post by:
Hi, I am trying to write my first Windows application using VB.NET and I am having some difficulties designing the UI. Basically its one Windows Form with 4 menus on the top (no drop downs)....
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
3
by: Sudha Pune | last post by:
Hi all I have 3 windows forms and I have one user control which holds a menu like below FormA | FormB | FormC This menu will displayed at top of the all the forms If i click FormB in...
2
by: Mario | last post by:
Hi, I am trying to create an application with multiple windows forms. The problem that I have is that after creating the window forms, I do not know how to open formN after closing Main form. ...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.