Skip to content

Derived form is write protected #8882

Open

Description

@r-schaefer

Environment

Visual Studio 2022 - Community Edition, Version 17.5.2

.NET version

.Net 7.0

Did this work in a previous version of Visual Studio and/or previous .NET release?

Yes: With Visual Studio 2019 and .Net Framework 4.6.2

Issue description

A derived form cannot be edited with VS 2022:

See attached project:

  • BaseForm.cs: is the base form class
  • BaseMDIChild.cs: inherits from BaseForm.cs
  • BaseMDIERPDataChild.cs: inherits from BaseMDIChild.cs

This form seems to be write protected. You cannot insert any control.

Steps to reproduce

  1. Open the project, compile it
  2. Open the form BaseMDIERPDataChild.cs and try inserting a control

Diagnostics

No response

Activity

  1. added
    area-VSDesigner
    untriaged
    on Mar 21, 2023
  2. r-schaefer commented on Mar 21, 2023

    @r-schaefer
    Author
  3. merriemcgaw commented on Mar 21, 2023

    @merriemcgaw
    Contributor

    @Olina-Zhang can your team please try to repro this?

  4. added
    waiting-for-testing
    and removed
    untriaged
    on Mar 21, 2023
  5. added this to the VS release milestone on Mar 21, 2023
  6. Olina-Zhang commented on Mar 22, 2023

    @Olina-Zhang
    Member

    @Olina-Zhang can your team please try to repro this?

    Yes, we can repro it, it was caused by Base Form's WindowsState with Maximized value set, repro with out of process designer in Visual Studio 16.11.25 to the latest, not in-process designer. Cannot drag and drop controls to form designer, and can copy&paste or double-click controls.

  7. removed
    waiting-for-testing
    on Mar 22, 2023
  8. r-schaefer commented on Mar 22, 2023

    @r-schaefer
    Author

    Many thanks for your quick support. Resetting the WindowState to Normal fixed the issues:

    • The form is no longer write protected
    • All controls are shown within the designer
  9. elachlan commented on Mar 25, 2023

    @elachlan
    Contributor

    Is there a corresponding designer issue created?

  10. Olina-Zhang commented on Mar 27, 2023

    @Olina-Zhang
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VSDesigner

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions