Launching multiple tabs in the default browser

Internet Explorer not working same as Chrome and Firefox

Page 1 of 1

0 Replies - 1631 Views - Last Post: 03 April 2010 - 03:00 AM Rate Topic: -----

#1 p0is0n  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 19-February 10

Launching multiple tabs in the default browser

Posted 03 April 2010 - 03:00 AM

Hi,
I am writing a C# program using .NET and need to open multiple links at the same time into tabs in the default browser.
I have a list of links in a list box control and open them using :
        private void btnOpenAllLinks_Click(object sender, EventArgs e)
        {
            if (this.lbLinks.Items.Count < 1)
            {
                MessageBox.Show("You must add at least one link to open.", "Invalid Selection");
            }
            else
            {
                foreach (string link in this.lbLinks.Items)
                {
                    System.Diagnostics.Process.Start(@link);
                }
            }
        }



This works fine in Google Chrome and Firefox, but in Internet Explorer it just opens the last link in the list.

I also have added to the double click event for the list box using :
        private void btnOpenLink_Click(object sender, EventArgs e)
        {
            if (this.lbLinks.SelectedIndex == -1)
            {
                MessageBox.Show("You must select a link to open.", "Invalid Selection");
            }
            else
            {
                System.Diagnostics.Process.Start((string)this.lbLinks.SelectedItem);
            }
        }



If I double click each link in the list box then Internet Explorer will open them in different tabs, but if I use the Open All Links method then only the last link opens.

Does anyone have any ideas of what could be causing this?
Or if doing this another may would solve the problem?

Thanks!

This post has been edited by p0is0n: 03 April 2010 - 02:47 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1