0

Hi,
I have an application where I would like to add the following:

When the user clicks on a button the FileOpenDialog must activate and allow the user to select an EXE file. When the user clicks OK, the selected EXE should execute.

I am new to C# so I need some help here, PLEASE!

Regards,
Wimpie

3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by Ramy Mahrous
0
if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                System.Diagnostics.Process.Start(openFileDialog1.FileName);
            }
0

WJSwan, if you look in your helpfile you will find examples too, it shows how to use other properties of the openfile dialog too.

0

Hi RamyMahrous and LizR,
Thanks a stack for your prompt responses. My application is now working like a charm!!

Regards,
Wimpie

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.