V
V
Vimake2014-01-04 01:41:40
C++ / C#
Vimake, 2014-01-04 01:41:40

Why doesn't the site open when the button is clicked?

I'm trying to open a website on a button click. Process.Start("http://site.su");But for some reason nothing is opening.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kerman, 2014-01-04
@Vimake

Process prc = new Process();
prc.StartInfo.FileName = @"http://site.su";
prc.StartInfo.UseShellExecute = true;
prc.Start();

Everything is working. The default browser is launched. Maybe it's the magic parameter UseShellExecute, which allows the operating system itself to choose which program to open the file / url?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question