-
C# Forms
I am new to C# and I am playing with my first bits of code.
I am building an application from scratch and looking at some
old code to model my new app.
The strange thing is this. I know that the old code must have
some controls inside its forms because I can see controls
referenced inside the code view of the forms.
But when I look at the form view it comes up blank
http://i67.photobucket.com/albums/h292/Athono/blank.png
The only difference between the two programs is their arangement
in the Solution Explorer. Here is how they are aranged in the
old program
http://i67.photobucket.com/albums/h292/Athono/old-1.png
Notice how the .resx file is arranged in the tree structure.
This is how the files are arranged in the new program.
http://i67.photobucket.com/albums/h292/Athono/new2.png
In the old sample code, I notice that there are Buttons, TextBoxes, and
GroupBoxes declared in the MainForm.Designer.cs file. So, why
can I not see this in the Form View?
-
I see.
You added code to the Designer.cs file. You don't do that, because that is what the forms designer uses to generate code. Any code placed there is replaced by the forms designer. So if you have a blank forms designer in design view, and add controls and buttons and such to the designer.cs file, they will just be replaced during compile/design by whatever is on the actual form, which is nothing.
-
Hi
Well,
If you are a beginner I would suggest you visit www.iocpl.com This is one of the nice site for C# beginner.
Thanks.