English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi, I am writing a program in C#, and I want a customize form to pop up. I created the new form and set it up as a new item (Form frmCustomize = new Form();). So then, in my code, I put this code in for when they click on Customize, and the form shows, but none of the controls are there, any reasons why, or any help?

The code:

// When they click 'Customize' from the help menu the Customize form shows
private void customizeToolStripMenuItem_Click(object sender, EventArgs e)
{
// Show the customize form
frmCustomize.Show();

}

2007-02-04 01:28:15 · 4 answers · asked by SM 3 in Computers & Internet Programming & Design

What are you talking about, read the question, it is a PROGRAM BUILT IN C# IT IS NOT HTML!

2007-02-04 01:50:44 · update #1

I am dragging and dropping the controls

2007-02-04 02:24:13 · update #2

4 answers

The problem is your variable declaration:
Form frmCustomize = new Form();

The "new Form()" part means create me a new base form (i.e. one with no controls on it)!

You need to find out the name of the form which you have created. If you are using Visual Studio you can do this by right-clicking the form in the designer and clicking properties and looking for the name property (normally at the top of the properties window).
Then (assuming that your form is called Form1) change your variable declatation to:
Form1 frmCustomize = new Form1();

2007-02-04 07:56:31 · answer #1 · answered by roadz123 1 · 1 0

Are you adding the controls dynamically? If so, you need to add them to the form as well.

2007-02-04 02:20:42 · answer #2 · answered by Anonymous · 0 0

Is this even a code? Try putting at the end.

2007-02-04 01:40:32 · answer #3 · answered by Only Sometimes 3 · 0 1

"http://www.w3.org/TR/html4/loose.dtd">


Untitled Document




yahoo

2007-02-04 01:44:36 · answer #4 · answered by msobhisultan 2 · 0 1

fedest.com, questions and answers