Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Click the Button of the Form Made in C# to Open the Desired File

Click the Button of the Form Made in C# to Open the Desired File

Ratings: (0)|Views: 1,088|Likes:
Published by Syed Arbab Ahmed
Click the button of the form made in C# to open the desired file. This program is based on windows programming.
Click the button of the form made in C# to open the desired file. This program is based on windows programming.

More info:

Published by: Syed Arbab Ahmed on Jun 14, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/01/2010

pdf

text

original

 
/* Click the button of the form made in C# to open the desired file */usingSystem;usingSystem.Windows.Forms;usingSystem.Drawing;usingSystem.Diagnostics;class ButtonForm:Form { ButtonMyButton; ButtonMyButton2; publicButtonForm(){Text ="Syed Arbab Ahmed Assignment EP-046142";MyButton =new Button(); MyButton.Text ="Click me to open your desired file";MyButton.Location =new Point(100, 200); MyButton2 =new Button(); MyButton2.Text =" Click me to open your desired file no. 2";MyButton2.Location =new Point(100, 100);  // Add button event handler to list.MyButton.Click +=new EventHandler(MyButtonClick); MyButton2.Click +=new EventHandler(MyButton2Click); Controls.Add(MyButton);Controls.Add(MyButton2);}[STAThread] public static voidMain() { ButtonFormskel =new ButtonForm();  Application.Run(skel); Application.EnableVisualStyles(); Application.Run(new ButtonForm());  //skel.BackColor = (1,1,1);} // Handler for MyButton.ProcessTheProcessYouNamed; private voidMyButtonClick(objectsender,EventArgse) {{TheProcessYouNamed =Process.Start(@"E:\Check.txt");//@ to avoid Unrecognized escape sequenceotherwise ERROR C:\Documents andSettings\tuser\My Documents\Visual Studio2005\Projects\WindowsApplication1\WindowsApplication1\Program.cs39TheProcessYouNamed.CloseMainWindow();}}

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
icmp liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->