Answer the question
In order to leave comments, you need to log in
What code to write to open a folder location on a computer?
I decided for the first time in my life to write a small program for myself. Using YouTube and the Internet, I did almost everything I needed. But I can not master one moment. I work in Visual Studio 2010. How do I open a specific folder on my computer when I click on a button. I'm attaching pictures just in case.
To open an excel file I use the following code:
private void button5_Click(object sender, EventArgs e)
{
var application = new Microsoft.Office.Interop.Excel.Application();
application.Visible = true;
application.Workbooks.Open(@"D:\YandexDisk\Бизнес документы\приходы расходы от 12.03.15.xlsx");
}
Answer the question
In order to leave comments, you need to log in
In the end, I found the answer myself. With this code it works as I need.
private void button3_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("D:\\YandexDisk/ООО Ригли/Договора с клиентами");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question