I have this code to open multiple urls from a richtextbox, it works fine, but the problem is that it opens all sites in separate browsers.
private void button1_Click(object sender, EventArgs e)
{
for(int i = 0 ; i < richTextBox1.Lines.Length ; i++ )
{
Process.Start("http://" + richTextBox1.Lines[i]);
}
}
Any ideas how I can open the pages like tabs in the same browser?
This worked for me...
private void button1_Click(object sender, EventArgs e)
{
foreach (string item in richTextBox1.Lines)
{
if (!string.IsNullOrEmpty(item))
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "firefox.exe";
startInfo.Arguments = "-new-tab " + item;
Process.Start(startInfo);
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With