It's not as simple to do as a console app, but it's possible - a lot of work though.
What I'd suggest you start with is by creating a basic WinForms app in C# - one button, one text box: press the button and the text box content goes into a MessageBox. Build it and look at the IL that it generates (
ILSpy[
^] may help there, but there are others available) to get a feel for what you need to do to create your own IL app directly.