Results 1 to 2 of 2

Thread: Problem renaming a Form

  1. #1
    divjoy is offline VB.NET Forum Fanatic
    .NET Framework
    .NET 4.5
    Join Date
    Aug 2013

    Problem renaming a Form

    Hi ,

    I'm using 2010 express and I have a form in my project called frmEditStaff.vb

    I have many other form and they all start with uppercase FrmEdit....

    I tried renaming to FrmEditStaff so that I can then do

    Dim frmEStaff As New FrmEditStaff

    But its not allowing me to rename the form but yet the above code snippet still runs


    Dim frmEStaff As New frmEditStaff

    I have tried renaming and then saving project and reopening but it still reverts to frmEditStaff !

    Has anyone seen this problem before and how to fix it?

    Suggestions on the Web are to create a new form and copy and paste over all the code...

    Its as if its a class instance?

    kind regards

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Identifiers in VB code is not case sensitive (but will retain name casing as they were declared) so that is not considered different names. Instead rename first to something else, then rename back with new casing.
    How to format posts with code blocks etc - present the problem/post properly

    Visual Studio Community 2017


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts