Search code examples
c#.netilspy

Getting properties from forms in IlSpy


Is it possible to get the properties (width, height, location, ...) of e.g. labels, buttons, textboxes, ... in IlSpy for .Net? My problem is, I have done a project but lost the project file, so there is only the .exe-file available. And I really don't wanna redesign the whole GUI again.


Solution

  • If you are using WinForms, all the generated code for the designer (width, height, location, text, ...) is placed into the InitializeComponent function in the respective Form class. You can decompile this method and find all the information that you need to recreate the form.