Search code examples
c#visual-studiovisual-studio-2010visual-studio-2019visual-studio-2022

Unable to select and move a button


I have recovered an open source project and I would like to move buttons and their size, but when I try to select a button individually it is the frame that contains all the buttons that is selected.

Do you know how to fix this problem? see screenshot thank you

Thanks


Solution

  • I assume you are a winform project or a WPF project.

    As jimi said, from the screenshot it looks like you have a usercontrol selected. Unless you have its corresponding cs file in your project, it is difficult for you to modify the size and position of the controls directly.

    You may need to use a decompiler to view the code of the corresponding control, and then reproduce and create a corresponding usercontrol or buttons yourself.

    Download ILSpy 2022 in Manage Extensions of VS:

    enter image description here

    The dll file corresponding to Tools->ILSpy->File->Open. You can find out what the corresponding control code is.

    enter image description here