473,667 Members | 2,670 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rookie Form Question

I have a csharp form1.cs created with VS. I have added a menu bar
with one option called help. I then created another form in VS called
help.cs. How can I launch the help form from the main form called
form1.

Seems simple.

private void menuItem5_Click (object sender, System.EventArg s e)
{
// Menuitem5_Click is the help menu item user sees
// Call help.cs
help.Gives me a bunch of methods like ActiveForm etc
}

Any suggestions. Basically I want to design a "help" form in VS and
then call it from my main form.

Thanks,

Dave
Nov 16 '05 #1
4 1444
Hello, Dave!
(new help()).Show();
or
help h=new help();
h.Show();

Second way allows you to do something
with the form before showing it.

You wrote on 5 Nov 2004 21:19:03 -0800:

DG> Seems simple.

DG> private void menuItem5_Click (object sender, System.EventArg s e)
DG> {
DG> // Menuitem5_Click is the help menu item user sees
DG> // Call help.cs
DG> help.Gives me a bunch of methods like ActiveForm etc
DG> }

DG> Any suggestions. Basically I want to design a "help" form in VS and
DG> then call it from my main form.

DG> Thanks,
With best regards, Nurchi BECHED.
Nov 16 '05 #2
HelpForm hf = new HelpForm();
hf.Show(); // or hf.ShowDialog() to show it in modal form

"Dave Guenthner" <da***@guenthne rs.com> wrote in message
news:ca******** *************** **@posting.goog le.com...
I have a csharp form1.cs created with VS. I have added a menu bar
with one option called help. I then created another form in VS called
help.cs. How can I launch the help form from the main form called
form1.

Seems simple.

private void menuItem5_Click (object sender, System.EventArg s e)
{
// Menuitem5_Click is the help menu item user sees
// Call help.cs
help.Gives me a bunch of methods like ActiveForm etc
}

Any suggestions. Basically I want to design a "help" form in VS and
then call it from my main form.

Thanks,

Dave
Nov 16 '05 #3
Thanks Guys! That allowed me to do exactly what I wanted. Create /
Design a form with VS and call it from main form.

Dave
"Shiva" <sh******@onlin e.excite.com> wrote in message news:<#$******* *******@TK2MSFT NGP15.phx.gbl>. ..
HelpForm hf = new HelpForm();
hf.Show(); // or hf.ShowDialog() to show it in modal form

"Dave Guenthner" <da***@guenthne rs.com> wrote in message
news:ca******** *************** **@posting.goog le.com...
I have a csharp form1.cs created with VS. I have added a menu bar
with one option called help. I then created another form in VS called
help.cs. How can I launch the help form from the main form called
form1.

Seems simple.

private void menuItem5_Click (object sender, System.EventArg s e)
{
// Menuitem5_Click is the help menu item user sees
// Call help.cs
help.Gives me a bunch of methods like ActiveForm etc
}

Any suggestions. Basically I want to design a "help" form in VS and
then call it from my main form.

Thanks,

Dave

Nov 16 '05 #4
Dave, if you take shivas suggestion to show the form as a dialog, it is good
practice to handle the dialogresult of the form (if applicable).... it is
something that gets overlooked a lot in the early days of Win Form
programming.

// Display the form as a modal dialog box.
form1.ShowDialo g();

// Determine if the OK button was clicked on the dialog box.
if (form1.DialogRe sult == DialogResult.OK )
{
// Display a message box indicating that the OK button was clicked.
MessageBox.Show ("The OK button on the form was clicked.");
// Optional: Call the Dispose method when you are finished with the
dialog box.
form1.Dispose() ;
}
else
{
// Display a message box indicating that the Cancel button was
clicked.
MessageBox.Show ("The Cancel button on the form was clicked.");
// Optional: Call the Dispose method when you are finished with the
dialog box.
form1.Dispose() ;
}

"Shiva" <sh******@onlin e.excite.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
HelpForm hf = new HelpForm();
hf.Show(); // or hf.ShowDialog() to show it in modal form

"Dave Guenthner" <da***@guenthne rs.com> wrote in message
news:ca******** *************** **@posting.goog le.com...
I have a csharp form1.cs created with VS. I have added a menu bar
with one option called help. I then created another form in VS called
help.cs. How can I launch the help form from the main form called
form1.

Seems simple.

private void menuItem5_Click (object sender, System.EventArg s e)
{
// Menuitem5_Click is the help menu item user sees
// Call help.cs
help.Gives me a bunch of methods like ActiveForm etc
}

Any suggestions. Basically I want to design a "help" form in VS and
then call it from my main form.

Thanks,

Dave

Nov 16 '05 #5

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

Similar topics

1
1395
by: Mimi | last post by:
Hi there, I have a text file that contains teacher timetable information. I'd like to open the text file, wait for input in a text box on the form (a teacher name), then have that teacher's timetable autofill into label controls on the form. Can someone point me in the right direction or provide advice? Thanks essay(_)help@rogers.com (remove parentheses)
8
4658
by: Tom | last post by:
Please help. I need a quick little scrpit to place on a web page that will count how many days have passed since January 1, 1970. I have ZERO experience writing ANY scripts. Anyone have any suggestions? As for what is displayed on the screen, I just want it to say: Today is: 12578 (or however many days have passed since that date.)
4
5173
by: Derrick | last post by:
I want to create a form with a few text boxes, labels, etc, and then use that form on a tab control, and re-use it as a stand alone dialog, can you drop forms onto forms and into dialogs like you can in Java? Thanks in advance! Derrick
0
1200
by: EZboy | last post by:
Rookie question ..... can anybody please send me a sample code that illustrates : how to display an mpg video clip on a new window that is being opened from within an application ? Many Thanks, EZboy
0
8366
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8565
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8650
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2779
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 we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.