0

Possible Duplicate:
Open link in same browser tab

How to do it in such a way that the URLs open in one browser window, each in separate tab? It there a way to do it in general way for all major browsers? Thanks!

Community
  • 1
  • 1
Alex Jenter
  • 4,324
  • 4
  • 36
  • 61
  • 3
    What if the user does not like tabs and prefer one window per URL? Don't worry so much. Just tell the OS to open (see Daboyzuk's answer) and let him do whatever the user configured him to do. – RedX Nov 30 '12 at 10:16
  • @RedX: I just want to make sure that if the user does like tabs, it can work in the way I've described. For now, Firefox by default doesn't seem to leave this option to the user, or does it? – Alex Jenter Nov 30 '12 at 10:25

1 Answers1

1

ShellExecute(NULL, "open", URL_GOES_HERE, NULL, NULL, SW_SHOWNORMAL);
should work fine for opening multiple tabs in the same window
obviously you will need one ShellExecute line per url

Daboyzuk
  • 449
  • 4
  • 14
  • Just tried it with three google.coms and they all opened in new tabs on chrome. I would be shocked to see any major browser that doesn't do that. – chris Nov 30 '12 at 10:15
  • Already tried this, it doesn't work with Firefox (at least). If Firefox was already open, it loads only the last URL. If not, it opens each URL in separate window (not tab). – Alex Jenter Nov 30 '12 at 10:16
  • [Old SO question](http://stackoverflow.com/questions/11087969/open-link-in-same-browser-tab) it seems that there is no way to determine how the executing program acts when opening a website – Daboyzuk Nov 30 '12 at 11:10