使用ilasm创建Windows窗体应用程序 [英] Create windows form application using ilasm

查看:53
本文介绍了使用ilasm创建Windows窗体应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我读了一本书.Net IL Assembler,我知道如何编写IL Assembly并使用ilasm生成托管代码(exe或dll)。我们可以使用IL Assembly创建基于控制台的应用程序,我的问题是如何使用ilasm制作Windows Form应用程序?我很好奇如何使用包含事件的按钮制作简单的表单使用IL Assembly点击显示消息框(windows对话框)。



如果我错了,请纠正我,我需要一些书籍推荐。谢谢!



我的尝试:



1.成功创造使用IL程序集的控制台应用程序(exe& dll)

2.了解如何在IL程序集上编码(创建变量,为变量赋值,循环,分支,创建方法,对象,类等)

3.使用ILDASM解析WIndows表单应用程序

Yesterday i was read book .Net IL Assembler, i know how to code IL Assembly and produce managed code(exe or dll) using ilasm. we can create console based application using IL Assembly, My question is how to make Windows Form Application using ilasm? i am curious how to make simple form with button that contain an event click that show message box (windows dialog) using IL Assembly.

correct me if i was wrong, i need some book recommendation. thanks!

What I have tried:

1. Success create console application (exe & dll) using IL Assembly
2. Know a little how to code on IL Assembly (create variable, assign value to variable, loop, branch, create method, object, class etc)
3. Dissasembled WIndows Form Application using ILDASM

推荐答案

这不像控制台应用程序那么简单,但它可能 - 虽然很多工作。

我建议你开始使用C#创建一个基本的WinForms应用程序 - 一个按钮,一个文本框:按下按钮,文本框内容进入MessageBox 。构建它并查看它生成的IL( ILSpy [ ^ ]可能会有所帮助,但还有其他可用的东西可以帮助您了解直接创建自己的IL应用程序需要做些什么。
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.


这篇关于使用ilasm创建Windows窗体应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆