[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

conflicting form names

Why is it that many of the forms in my project give a message like 'conflicting formname found "xxxxxxxx' using the name "xxxxxxx'' . I have a very large number of forms and also none of them have any ambigous or similar names.
where and why does the conflict happen?
THANKS
Sanjay
0
pratish
Asked:
pratish
1 Solution
 
JuiletteCommented:
don't post xxxx post the actual message.
A msg Number would help as well it it gives one.
Wayne
0
 
Erick37Commented:
No two forms can have the same Name Property within a project.
Open a new project, then add each of your forms, one at a time to the new project. If any of the forms has the same Name Property of a previously added form, you will get this message.
You can view any FRM file in a text viewer/editor to confirm the Name Property.  It is listed like:
Begin VB.Form Form1
0
 
DrDelphiCommented:
You are probably trying to include forms from  other projects into your current one which have the generic, non descript names of "Form1,Form2, etc,etc.." The best way to avoid this (and generally good programming pratice in any case), is to give each form (and every other control for that matter) a meaningful name. For example, if you have a form which you are using for password input from a user, you might name that form, FrmPassword. A textbox on that form might be called TxtPswrdInput. There is a methodology out there called Hungarian notation. I taught it to my VB students. In essence, you take the first three letters of a control (or form,dialog, etc) and abbreviate them... (Form=Frm, Dialog=Dlg, etc,etc.) to that you tack on a name which describes the function that control serves; i,e: FrmSplash, TxtEnterData,LblDisplayTime.  
0
 
VbmasterCommented:
I had this problem in a old project of mine and this was the reason.. let's say the problem was in a form called frmCopy. Open that form file and search the line starting with "Attribute VB_Name", in my (wrong) form it was..

Attribute VB_Name = "frmcopy"

I changed that line to..

Attribute VB_Name = "frmCopy"

and it didn't give me the error message again. Now you try it.

(if you don't see the difference, it's a capital C on the right choice)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now