如何在按钮上打开ms画图 [英] how to open a ms paint on button click

查看:164
本文介绍了如何在按钮上打开ms画图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我想在按钮上打开一个新的MS绘制窗口,点击
按钮放在获胜表单上

hi all

i want to open a new MS paint window on a button click
button is placed on win form

推荐答案



只需为按钮单击创建事件处理程序,然后将以下行添加到该处理程序中:

Hi,

just create the event handler for the button click and add the following line to the handler:

System.Diagnostics.Process.Start("mspaint");


string path = System.IO.Path.Combine(Environment.SystemDirectory, "mspaint.exe");
System.Diagnostics.Process paintProcess = new System.Diagnostics.Process();
paintProcess.StartInfo.FileName = path;
paintProcess.Start();


这篇关于如何在按钮上打开ms画图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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