R
R
Rust-482021-12-26 18:15:24
C++ / C#
Rust-48, 2021-12-26 18:15:24

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");
        }


61c886c3ecb2b867537378.jpeg
61c886d1b7046304727358.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rust-48, 2021-12-26
@Rust-48

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/ООО Ригли/Договора с клиентами");
        }

P
Python Newbie, 2021-12-26
@Levman5

https://coderoad.ru/17836903/%D0%9A%D0%B0%D0%BA-%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question