VB Open Project Name conflict resolution method

Source: Internet
Author: User
Today when the VB project opened, always prompt: "frmresultinfo.frm found naming conflicts, will use the name ' Frmresultinfo", began to think that it is their own open way has a problem, closed after the new open, however, there is no egg use, What is the cause of the situation? What should we do to solve this problem?

reason for the occurrence:

1. Manually modified the name of the form

2. Referencing someone else's form file

The file names of the 3.FrmName and frm files are inconsistent


Workaround:

Although VB has two principles when writing code:

Principle 1: The keywords automatically change according to the system standard; PS: When we enter End,end if, the system automatically becomes end, end if

Principle 2: Variable name according to the declaration of the large lowercase, which is the unique advantage of VB;

But there are VB time is also case-sensitive, in this error, we find the wrong file, right-click Open mode, select the "Notepad open frmresultinfo.frm file", here we have to pay attention to the top line "Begin VB." Formfrmresultinfo "" Here the Frmresultinfo is the name of the form, where the writing is lowercase "The following figure code:

Begin VB. Form frmresultinfo 
   Caption         =   "Query score Information"
   clientheight    =   6390
   clientleft      =   120
   clienttop       =   465
   clientwidth     =   9045
   linktopic       =   "Form1"
   ScaleHeight     =   6390
   scalewidth      =   9045

Then we manually move the cursor down, or through Notepad "find" function, enter: Attribute vb_name =, then there will be a line is: Attribute vb_name = "Frmresultinfo", Here we should pay attention to this code writing case, the "Frmresultinfo" and the Above "Frmresultinfo" is not the same, the following code:

Attribute vb_name = "Frmresultinfo"
Attribute Vb_globalnamespace = False
Attribute vb_creatable = False
Attribute Vb_predeclaredid = True
Attribute vb_exposed = False

This time we need to do the two changes to the same, you can look at our form is uppercase or lowercase, to the same can be, here I unified to the lowercase "frmresultinfo", that when the VB project to open again, found that the problem has been resolved;

If you have a better way, please comment area Exchange share, thank you.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.