Thread: C# Forms

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    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?

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    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
    Posts
    2

    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.

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