文本框内的 Vb.net 运行脚本 [英] Vb.net Run Script inside Textbox

查看:23
本文介绍了文本框内的 Vb.net 运行脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有办法执行 Textbox1 中的脚本就像你在 textbox1 中写这段代码一样

I was wondering if there is a way to excute a Script that is in Textbox1 Like you write this code inside textbox1

msgbox("Hello World")

当您单击按钮或按 Enter 键时,它将运行您在 Textbox1 中编写的命令/脚本

and when you click on the button or press enter it will run the command/script you wrote in Textbox1

推荐答案

您正在寻找 CodeDOM.这基本上可以让您从程序中运行编译器.请注意,用户可能会在框中键入 anything 并用它破坏您的程序.

You're looking for CodeDOM. This basically lets you run the compiler from within your program. Be careful, the user could type anything into the box and compromise your program with it.

这篇关于文本框内的 Vb.net 运行脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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