Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Open link in new Tab when Mouse Middle Click...

Open link in new Tab when Mouse Middle Click...

Scheduled Pinned Locked Moved C#
question
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Baeltazor
    wrote on last edited by
    #1

    Hi All :) I'm working on a little web browser that supports tabs and all is good but everytime I click a link that is supposed to open in a new tab or window, instead of opening a new window/tab in my own web browser that i am making, it chooses to open a new instance of the system's default web browser (Internet Explorer) and I have tried to find some articles/samples on the web but have been unsuccessful. Does anybody know how I would go about allowing links to be opened in a new tab in the browser i am making? Any suggestions would be greatly appreciated thanks jason

    C 1 Reply Last reply
    0
    • B Baeltazor

      Hi All :) I'm working on a little web browser that supports tabs and all is good but everytime I click a link that is supposed to open in a new tab or window, instead of opening a new window/tab in my own web browser that i am making, it chooses to open a new instance of the system's default web browser (Internet Explorer) and I have tried to find some articles/samples on the web but have been unsuccessful. Does anybody know how I would go about allowing links to be opened in a new tab in the browser i am making? Any suggestions would be greatly appreciated thanks jason

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, unless I misse the memo ( possible ), the web browser control doesn't support tabs. So, you'd have to catch the event of a page opening, swallow it, and create your own tab, and open the URL there.

      Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

      B 1 Reply Last reply
      0
      • C Christian Graus

        Well, unless I misse the memo ( possible ), the web browser control doesn't support tabs. So, you'd have to catch the event of a page opening, swallow it, and create your own tab, and open the URL there.

        Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

        B Offline
        B Offline
        Baeltazor
        wrote on last edited by
        #3

        thanks christian, that's exactly what i'm trying to figure out, i obviously didn't explain my situation properly in my first message, sorry. I'll keep looking :)

        C 1 Reply Last reply
        0
        • B Baeltazor

          thanks christian, that's exactly what i'm trying to figure out, i obviously didn't explain my situation properly in my first message, sorry. I'll keep looking :)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser_members.aspx[^] Reading the MSDN, it looks like the NewWindow[^] event is what you want.

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          B 1 Reply Last reply
          0
          • C Christian Graus

            http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser_members.aspx[^] Reading the MSDN, it looks like the NewWindow[^] event is what you want.

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

            B Offline
            B Offline
            Baeltazor
            wrote on last edited by
            #5

            Thank you Christian for yout time and help, that link was very useful. I'm actually wondering how I could've overlooked that page in the first place. Well, I am now browsing the web with full tab support yay! Thanks again christian. Maybe I could turn this into an article??

            C 1 Reply Last reply
            0
            • B Baeltazor

              Thank you Christian for yout time and help, that link was very useful. I'm actually wondering how I could've overlooked that page in the first place. Well, I am now browsing the web with full tab support yay! Thanks again christian. Maybe I could turn this into an article??

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Well, if you finish the project, then I'd imagine you could write an article which covers this and other things you learned along the way. People are always writing their own browsers, so I'm sure it would be well recieved.

              Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

              B 1 Reply Last reply
              0
              • C Christian Graus

                Well, if you finish the project, then I'd imagine you could write an article which covers this and other things you learned along the way. People are always writing their own browsers, so I'm sure it would be well recieved.

                Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

                B Offline
                B Offline
                Baeltazor
                wrote on last edited by
                #7

                I'm planning on adding a new type of favorites system, but also supporting existing favorites that have been created by other browsers, once that's finished I'll start writing the article. I'd love to see what others have to say about it.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups