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

if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                System.Diagnostics.Process.Start(openFileDialog1.FileName);
            }

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

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

Regards,
Wimpie

Marke this thread as solved! please.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.