Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
How to open the MS paint by clicking the button in c# win forms.

C#
private void button13_Click_2(object sender, EventArgs e)
       {

}
how to Open the Ms Piant by clicking the button and edit the frames. or bitmap?
Posted

1 solution

You should define ProcessStartInfo, something like this:
System.Diagnostics.ProcessStartInfo procInfo = new    System.Diagnostics.ProcessStartInfo();
procInfo.FileName = ("mspaint.exe");
procInfo.Arguments = ImageFilePath; //Full Path to an image


And then start the process:
System.Diagnostics.Process.Start(procInfo);


Here is info about this method on MSDN;
Process.Start[^]

I didn't test this but it should work.
 
Share this answer
 
Comments
sairam.bhat 5-Mar-11 3:43am    
Thank you
Sergey Alexandrovich Kryukov 6-Mar-11 0:03am    
Even though I voted 5 for your formally correct answer, I cannot believe someone needs to take a labor of creating a single button to open such thing as MSPaint, which absolutely sucks! :-)
--SA
TimGameDev 6-Mar-11 1:22am    
SA, what are you talking about? MSPaint is the greatest graphical editor ever! =) ok, I'm just kidding, you are right (as always =))
Sergey Alexandrovich Kryukov 6-Mar-11 1:49am    
:-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900