You must Sign In to post a response.
  • Category: Windows

    Couldnot see design page of Form in windowapplication

    When I build my class, Im facing the error..
    Form1.Dispose(bool) . No suitable method found to override

    Shocked to see the design page giving me below error.
    The designer could not be shown for this file because none of the class within it can be redesigned. The designer inspected the following classes in the file Form1. The base class System.object cannot be designed.

    Also, When I see the Form.cs in folder, it is 0 KB.


    There is no change I did..What could be the issue?
  • #766120
    Hi,
    This type of issue raises when we change the class name from .cs file without updating its proper references.
    In your case check these 2 files are as per given syntax or not:
    Form1.cs
    namespace windowapplication
    {
    public partial class Form1 : Form

    Form1.designer.cs
    namespace windowapplication
    {
    partial class Form1

  • #766121
    Hi Shashi,

    Damn sure file name has not been changed.
    As u said, I checked for Form1.designer.cs. It is same like you mentioned.
    But there is problem opening Form1.cs. Since this design & code page is blank.

  • #766122
    Hi,

    I guess the problem might be your application page as corrupted, request you to kindly redesign the page as you done previously and build the application.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #766123
    HI Naveen,


    I have made lot of changes. Redesign is something not possible. Could you please say some other possible restoration methods

  • #766124
    Hi

    search corresponding file with extension .

    Did you save that file in your project?

    no means close and reopen in your project.

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766125
    HI Dot net developer,

    Yes the files are saved.. Till yesterday I could build and execute.. Also I tried re-opening whole application twice which still doesnt help me

  • #766126
    Hi

    send me corrupted file project. I try and let me know.

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766127
    Hi lily,

    First off all take a backup of the specified file and then go to the physical folder of the file then open the file in notepad and then copy the content in that and create new application then paste your copied content into that, no need to redesign total stuff again.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #766132
    HI Naveen, Now Form1.cs has no content.

    Rest Form1.designer.cs and Form1.resx has content..

    So which one to take backup? I need content for Form1.cs. There is no backup

  • #766133
    Please see instaces of the error
    1. Hide Call Stack

    at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
    at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
    at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
    at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

  • #766134
    hi

    Refer this url

    I have mention below url fixed.

    "stackoverflow.com/questions/5382967/c-sharp-visual-studio-2008-design-time-error-in-the-windows-forms-designer"

    "stackoverflow.com/questions/15064723/visual-studio-2008-error-at-accessing-form-designer"

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766135
    Hi lily,

    The problem with cs file only right? Then first priority is cs file only then you need resx file based on that automatically designer will update the controls which you design in resx.

    For this particular scenario I guess our experts help won't helpful to you, since the problem with your project file we can't say the exact problem and solution to resolve it, we just guess the problem and guide for resolving it, rather than wasting time; my suggestion is better to discuss with your team lead, he will guide you how to resolve it, still if you struck to resolve the issue then check with your any one of team member may be they have back up of this file. Using that you can redesign what you did in your previous file.

    Hope you understood.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #766137
    HI,

    Thanks Naveen and dot netdeveloper

    I just added the below code in emplty Form1.cs. Luckily I got design page alone... "View Code" gives the same below code back..All the code and events I included in Form1.cs previously are missing asusual.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;

    namespace Log
    {
    public partial class Form1 : Form
    {
    }
    }

  • #766142
    Hi lily,

    Nice to hear to resolve the issue by your own, How do you open the file(.cs)?

    What are you mentioned above that is mandatory namespaces and inheritance to the class file, how do you miss that previously, please explain so that in future if any one face same type of issue, they will get idea to resolve the issue without taking others help.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.