Thread: C# Forms

  1. #1
    Registered User
    Join Date
    Jan 2008

    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

    The only difference between the two programs is their arangement
    in the Solution Explorer. Here is how they are aranged in the
    old program
    Notice how the .resx file is arranged in the tree structure.
    This is how the files are arranged in the new program.

    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?

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    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.
    Last edited by indigo0086; 01-10-2008 at 08:47 AM.

  3. #3
    Registered User
    Join Date
    Jan 2008



    If you are a beginner I would suggest you visit This is one of the nice site for C# beginner.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Good introduction to Windows Forms?
    By jcafaro10 in forum C# Programming
    Replies: 1
    Last Post: 05-19-2009, 06:11 PM
  2. Replies: 2
    Last Post: 04-02-2009, 04:40 AM
  3. Httpd forms with?
    By |HBO| in forum Networking/Device Communication
    Replies: 1
    Last Post: 02-22-2008, 11:45 PM
  4. C# Game using Forms
    By ejohns85 in forum C# Programming
    Replies: 1
    Last Post: 12-16-2006, 05:35 PM
  5. Which one :MFC, Win32, Windows Forms (.Net)?
    By Robert_Sitter in forum Windows Programming
    Replies: 6
    Last Post: 11-17-2005, 06:15 AM