Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. error code

error code

Scheduled Pinned Locked Moved C#
helpcsharpvisual-studio
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    a fatemeh
    wrote on last edited by
    #1

    when I build my project it's goes well and run correctly but when I run it once more ,I get This error Warning 1 The class Form1 can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again. 0 0 Can anybody help me with this I Redesign My project two times but it's not helping

    M 1 Reply Last reply
    0
    • A a fatemeh

      when I build my project it's goes well and run correctly but when I run it once more ,I get This error Warning 1 The class Form1 can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again. 0 0 Can anybody help me with this I Redesign My project two times but it's not helping

      M Offline
      M Offline
      markovl
      wrote on last edited by
      #2

      Probably you've added another class to the Form1.cs file above the Form1 class declaration. Either move the other class to a separate cs file (better for readability) or move the Form1 class as topmost in the file. Then refresh the designer and everything should be back to normal.

      2A

      A 1 Reply Last reply
      0
      • M markovl

        Probably you've added another class to the Form1.cs file above the Form1 class declaration. Either move the other class to a separate cs file (better for readability) or move the Form1 class as topmost in the file. Then refresh the designer and everything should be back to normal.

        2A

        A Offline
        A Offline
        a fatemeh
        wrote on last edited by
        #3

        thanks a lot , I've done what you recommend,it Worked

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups