Out of curiosity, when you start a new solution and you add your first project to it, if it's a window's form application, you get a nice and neat form called "Form1" (how creative!). Do you rename that file? If so, what do you name it? If not, why?


It will be renamed according to it's function.

commented: As everything should be! +9

I always name the main form some variant of 'Main', because that's what it is. All other forms are named by function. Exactly what the name is depends on the naming conventions set forth in the local coding standard. If I use mine, then it would be 'frmMain'. In the company for which I work, it would be 'MainForm' in the old naming convention I used several years ago, it would be 'o_Main'. I don't refer to it simply as Main() because that is the name of the entry point in Program.cs, and would thus introduce ambiguity, but it is actually a form and should thus be named according to the naming convention for forms as per your particular environment. If you don't have a coding standard, you should really set one.

I let the name Form1 as it is. It is the first form that opens in the Main method and has further very little connotations with "Main". I name extra forms, depending on their function.

I usually leave it as Form1. It's easy, and I always remain that it is the main form

(for awhile I would then name other forms form2, form3, ext and then maybe follow it with another name, but I soon stopped doing that)

According To Program Theme!

I tend to go old school "frmMain"

I name it after the program itself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.