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
    Posts
    109
    Reputation
    47

    Problem renaming a Form

    Hi ,

    I'm using vb.net 2010 express and I have a form in my vb.net 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
    frmEstaff.show

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

    as

    Dim frmEStaff As New frmEditStaff
    frmEstaff.show

    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
    Location
    Norway
    Posts
    15,080
    Reputation
    2802
    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.

Bookmarks

Posting Permissions

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