There is a feature when you open the context menu of an object.
Start with a Window object (because sometimes it’ll automagically convert any embedded controls–but not always) and right-click, and choose from the context menu “Convert to DesktopWindow”
This will typically take care of a lot of the work, except for actual code changes.
So, then follow the instructions in this bit from the documentation:
And don’t forget to turn on API2 related code analysis warnings for the project.