internet explorer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Etayki

    #1

    internet explorer

    Hi!

    I am new to VB.net and I am using the Visual Basic 2005 Express
    Edition

    I have two questions:

    1. I am trying to write an application that will automate Internet
    Explorer and store data in a database. Am I better off learning VB.net
    or C#.net? Is there a free development environment for C# as well?

    2. I have followed examples in other posts and copied this code to
    open up IE:

    Imports SHDocVw
    Public Class Form1

    Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
    System.EventArg s) Handles MyBase.Load
    Dim wbBrowser As New SHDocVw.Interne tExplorer
    wbBrowser.Visib le = True
    wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
    Nothing, Nothing)
    End Sub
    End Class

    These are my errors:

    Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
    contain any public member or cannot be found. Make sure the namespace
    or the type is defined and contains at least one public member. Make
    sure the imported element name doesn't use any aliases. C:\Documents
    and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
    Projects\Window sApplication3\F orm1.vb 1 9 WindowsApplicat ion3

    Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
    and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
    Projects\Window sApplication3\F orm1.vb 5 30 WindowsApplicat ion3

    Can someone please help this newbe?

  • Martin H.

    #2
    Re: internet explorer

    Hello Etayki,
    1. I am trying to write an application that will automate Internet
    Explorer and store data in a database. Am I better off learning VB.net
    or C#.net?
    That depends on you. If you are very familiar with C/C++, then you might
    be more interested in C#. If you have ties to BASIC, then VB.NET might
    be more interesting for you.
    Is there a free development environment for C# as well?
    Yes, there is. You can download it from the MS website at

    <http://msdn.microsoft. com/vstudio/express/visualcsharp/default.aspx>

    Best regards,

    Martin

    Comment

    • camainc

      #3
      Re: internet explorer

      On Apr 14, 4:44 am, "Etayki" <etay...@gmail. comwrote:
      Hi!
      >
      I am new to VB.net and I am using the Visual Basic 2005 Express
      Edition
      >
      I have two questions:
      >
      1. I am trying to write an application that will automate Internet
      Explorer and store data in a database. Am I better off learning VB.net
      or C#.net? Is there a free development environment for C# as well?
      >
      2. I have followed examples in other posts and copied this code to
      open up IE:
      >
      Imports SHDocVw
      Public Class Form1
      >
      Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
      System.EventArg s) Handles MyBase.Load
      Dim wbBrowser As New SHDocVw.Interne tExplorer
      wbBrowser.Visib le = True
      wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
      Nothing, Nothing)
      End Sub
      End Class
      >
      These are my errors:
      >
      Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
      contain any public member or cannot be found. Make sure the namespace
      or the type is defined and contains at least one public member. Make
      sure the imported element name doesn't use any aliases. C:\Documents
      and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
      Projects\Window sApplication3\F orm1.vb 1 9 WindowsApplicat ion3
      >
      Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
      and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
      Projects\Window sApplication3\F orm1.vb 5 30 WindowsApplicat ion3
      >
      Can someone please help this newbe?
      Do you want to start Internet Explorer or just the user's default web
      browser? If you want to start the default browser, use this code
      (pulled from MSDN):

      Dim myTargetURL As String = "http://www.google.com"
      System.Diagnost ics.Process.Sta rt(myTargetURL)

      If you want to start IE specifically, then do something like this:

      Dim myTargetURL As String = "http://www.google.com"
      System.Diagnost ics.Process.Sta rt("IExplore.ex e", myTargetURL)

      Hope that helps,

      Chuck


      Comment

      • Lloyd Sheen

        #4
        Re: internet explorer


        "camainc" <camainc@gmail. comwrote in message
        news:1176584785 .191400.104670@ d57g2000hsg.goo glegroups.com.. .
        On Apr 14, 4:44 am, "Etayki" <etay...@gmail. comwrote:
        >Hi!
        >>
        >I am new to VB.net and I am using the Visual Basic 2005 Express
        >Edition
        >>
        >I have two questions:
        >>
        >1. I am trying to write an application that will automate Internet
        >Explorer and store data in a database. Am I better off learning VB.net
        >or C#.net? Is there a free development environment for C# as well?
        >>
        >2. I have followed examples in other posts and copied this code to
        >open up IE:
        >>
        >Imports SHDocVw
        >Public Class Form1
        >>
        > Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
        >System.EventAr gs) Handles MyBase.Load
        > Dim wbBrowser As New SHDocVw.Interne tExplorer
        > wbBrowser.Visib le = True
        > wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
        >Nothing, Nothing)
        > End Sub
        >End Class
        >>
        >These are my errors:
        >>
        >Warning 1 Namespace or type specified in the Imports 'SHDocVw'
        >doesn't
        >contain any public member or cannot be found. Make sure the namespace
        >or the type is defined and contains at least one public member. Make
        >sure the imported element name doesn't use any aliases. C:\Documents
        >and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
        >Projects\Windo wsApplication3\ Form1.vb 1 9
        >WindowsApplica tion3
        >>
        >Error 2 Type 'SHDocVw.Intern etExplorer' is not defined.
        >C:\Documents
        >and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
        >Projects\Windo wsApplication3\ Form1.vb 5 30
        >WindowsApplica tion3
        >>
        >Can someone please help this newbe?
        >
        Do you want to start Internet Explorer or just the user's default web
        browser? If you want to start the default browser, use this code
        (pulled from MSDN):
        >
        Dim myTargetURL As String = "http://www.google.com"
        System.Diagnost ics.Process.Sta rt(myTargetURL)
        >
        If you want to start IE specifically, then do something like this:
        >
        Dim myTargetURL As String = "http://www.google.com"
        System.Diagnost ics.Process.Sta rt("IExplore.ex e", myTargetURL)
        >
        Hope that helps,
        >
        Chuck
        >
        >
        If you want to host a browser in your app you can use the WebBrowser
        control. It is easy to create buttons to simulate the forward / back
        buttons and a textbox for the URL. There are events from this control which
        you can capture to update those controls. For example the DocumentComplet ed
        event will present you with the URL of the last page transmitted.

        There are a set of methods available such as Navigate to start browsing to
        the string (URL) provided. And other command such as GoHome if you wanted to
        provide a button control to do that. I have a full clone of IE with my
        extensions working with just a small amount of code.

        Good luck and if you have questions I can answer them.

        Lloyd Sheen

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: internet explorer

          Etayki,

          You need to set a reference to Internet explorer and than an import. It is
          always hard to find but it is in the Com tab.

          Project -Add Reference -Com (I thought just Internet Explorere) but
          search yourself it can be a hell of a job by instance because Microsoft uses
          irregular the internal and the external names.

          There is almost not any difference between using in this VB.Net or C#.

          As I saw in your code don't you need in VB.Net that nothing, nothing,
          nothing, what can by anoying in C#.


          "Etayki" <etayluz@gmail. comschreef in bericht
          news:1176543881 .886568.36270@n 76g2000hsh.goog legroups.com...
          Hi!
          >
          I am new to VB.net and I am using the Visual Basic 2005 Express
          Edition
          >
          I have two questions:
          >
          1. I am trying to write an application that will automate Internet
          Explorer and store data in a database. Am I better off learning VB.net
          or C#.net? Is there a free development environment for C# as well?
          >
          2. I have followed examples in other posts and copied this code to
          open up IE:
          >
          Imports SHDocVw
          Public Class Form1
          >
          Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
          System.EventArg s) Handles MyBase.Load
          Dim wbBrowser As New SHDocVw.Interne tExplorer
          wbBrowser.Visib le = True
          wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
          Nothing, Nothing)
          End Sub
          End Class
          >
          These are my errors:
          >
          Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
          contain any public member or cannot be found. Make sure the namespace
          or the type is defined and contains at least one public member. Make
          sure the imported element name doesn't use any aliases. C:\Documents
          and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
          Projects\Window sApplication3\F orm1.vb 1 9 WindowsApplicat ion3
          >
          Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
          and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
          Projects\Window sApplication3\F orm1.vb 5 30 WindowsApplicat ion3
          >
          Can someone please help this newbe?
          >

          Comment

          • Lloyd Sheen

            #6
            Re: internet explorer


            "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
            news:uqSyZz7fHH A.4936@TK2MSFTN GP04.phx.gbl...
            Etayki,
            >
            You need to set a reference to Internet explorer and than an import. It is
            always hard to find but it is in the Com tab.
            >
            Project -Add Reference -Com (I thought just Internet Explorere) but
            search yourself it can be a hell of a job by instance because Microsoft
            uses irregular the internal and the external names.
            >
            There is almost not any difference between using in this VB.Net or C#.
            >
            As I saw in your code don't you need in VB.Net that nothing, nothing,
            nothing, what can by anoying in C#.
            >
            >
            "Etayki" <etayluz@gmail. comschreef in bericht
            news:1176543881 .886568.36270@n 76g2000hsh.goog legroups.com...
            >Hi!
            >>
            >I am new to VB.net and I am using the Visual Basic 2005 Express
            >Edition
            >>
            >I have two questions:
            >>
            >1. I am trying to write an application that will automate Internet
            >Explorer and store data in a database. Am I better off learning VB.net
            >or C#.net? Is there a free development environment for C# as well?
            >>
            >2. I have followed examples in other posts and copied this code to
            >open up IE:
            >>
            >Imports SHDocVw
            >Public Class Form1
            >>
            > Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
            >System.EventAr gs) Handles MyBase.Load
            > Dim wbBrowser As New SHDocVw.Interne tExplorer
            > wbBrowser.Visib le = True
            > wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
            >Nothing, Nothing)
            > End Sub
            >End Class
            >>
            >These are my errors:
            >>
            >Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
            >contain any public member or cannot be found. Make sure the namespace
            >or the type is defined and contains at least one public member. Make
            >sure the imported element name doesn't use any aliases. C:\Documents
            >and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
            >Projects\Windo wsApplication3\ Form1.vb 1 9 WindowsApplicat ion3
            >>
            >Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
            >and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
            >Projects\Windo wsApplication3\ Form1.vb 5 30 WindowsApplicat ion3
            >>
            >Can someone please help this newbe?
            >>
            >
            >
            As I pointed out earlier since you are using VB 2005 just use the MS
            provided WebBroswer control. No need for COM.

            Lloyd Sheen

            Comment

            • Cor Ligthert [MVP]

              #7
              Re: internet explorer

              Lloyd,

              In my idea is (seeing the code) direct Internet Explorer used
              (SHDocVW.Intern etExplorer), not the interop AX Com version.

              Can you tell me how you can do that with the 2.0 webbrowser?

              Cor

              "Lloyd Sheen" <a@b.cschreef in bericht
              news:EF6EBFED-1F2C-450D-BC90-29EFD0974FFF@mi crosoft.com...
              >
              "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
              news:uqSyZz7fHH A.4936@TK2MSFTN GP04.phx.gbl...
              >Etayki,
              >>
              >You need to set a reference to Internet explorer and than an import. It
              >is always hard to find but it is in the Com tab.
              >>
              >Project -Add Reference -Com (I thought just Internet Explorere) but
              >search yourself it can be a hell of a job by instance because Microsoft
              >uses irregular the internal and the external names.
              >>
              >There is almost not any difference between using in this VB.Net or C#.
              >>
              >As I saw in your code don't you need in VB.Net that nothing, nothing,
              >nothing, what can by anoying in C#.
              >>
              >>
              >"Etayki" <etayluz@gmail. comschreef in bericht
              >news:117654388 1.886568.36270@ n76g2000hsh.goo glegroups.com.. .
              >>Hi!
              >>>
              >>I am new to VB.net and I am using the Visual Basic 2005 Express
              >>Edition
              >>>
              >>I have two questions:
              >>>
              >>1. I am trying to write an application that will automate Internet
              >>Explorer and store data in a database. Am I better off learning VB.net
              >>or C#.net? Is there a free development environment for C# as well?
              >>>
              >>2. I have followed examples in other posts and copied this code to
              >>open up IE:
              >>>
              >>Imports SHDocVw
              >>Public Class Form1
              >>>
              >> Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
              >>System.EventA rgs) Handles MyBase.Load
              >> Dim wbBrowser As New SHDocVw.Interne tExplorer
              >> wbBrowser.Visib le = True
              >> wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
              >>Nothing, Nothing)
              >> End Sub
              >>End Class
              >>>
              >>These are my errors:
              >>>
              >>Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
              >>contain any public member or cannot be found. Make sure the namespace
              >>or the type is defined and contains at least one public member. Make
              >>sure the imported element name doesn't use any aliases. C:\Documents
              >>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
              >>Projects\Wind owsApplication3 \Form1.vb 1 9 WindowsApplicat ion3
              >>>
              >>Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
              >>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
              >>Projects\Wind owsApplication3 \Form1.vb 5 30 WindowsApplicat ion3
              >>>
              >>Can someone please help this newbe?
              >>>
              >>
              >>
              >
              As I pointed out earlier since you are using VB 2005 just use the MS
              provided WebBroswer control. No need for COM.
              >
              Lloyd Sheen

              Comment

              • Lloyd Sheen

                #8
                Re: internet explorer


                "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                news:uw9bZpKgHH A.2640@TK2MSFTN GP06.phx.gbl...
                Lloyd,
                >
                In my idea is (seeing the code) direct Internet Explorer used
                (SHDocVW.Intern etExplorer), not the interop AX Com version.
                >
                Can you tell me how you can do that with the 2.0 webbrowser?
                >
                Cor
                >
                "Lloyd Sheen" <a@b.cschreef in bericht
                news:EF6EBFED-1F2C-450D-BC90-29EFD0974FFF@mi crosoft.com...
                >>
                >"Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                >news:uqSyZz7fH HA.4936@TK2MSFT NGP04.phx.gbl.. .
                >>Etayki,
                >>>
                >>You need to set a reference to Internet explorer and than an import. It
                >>is always hard to find but it is in the Com tab.
                >>>
                >>Project -Add Reference -Com (I thought just Internet Explorere) but
                >>search yourself it can be a hell of a job by instance because Microsoft
                >>uses irregular the internal and the external names.
                >>>
                >>There is almost not any difference between using in this VB.Net or C#.
                >>>
                >>As I saw in your code don't you need in VB.Net that nothing, nothing,
                >>nothing, what can by anoying in C#.
                >>>
                >>>
                >>"Etayki" <etayluz@gmail. comschreef in bericht
                >>news:11765438 81.886568.36270 @n76g2000hsh.go oglegroups.com. ..
                >>>Hi!
                >>>>
                >>>I am new to VB.net and I am using the Visual Basic 2005 Express
                >>>Edition
                >>>>
                >>>I have two questions:
                >>>>
                >>>1. I am trying to write an application that will automate Internet
                >>>Explorer and store data in a database. Am I better off learning VB.net
                >>>or C#.net? Is there a free development environment for C# as well?
                >>>>
                >>>2. I have followed examples in other posts and copied this code to
                >>>open up IE:
                >>>>
                >>>Imports SHDocVw
                >>>Public Class Form1
                >>>>
                >>> Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
                >>>System.Event Args) Handles MyBase.Load
                >>> Dim wbBrowser As New SHDocVw.Interne tExplorer
                >>> wbBrowser.Visib le = True
                >>> wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
                >>>Nothing, Nothing)
                >>> End Sub
                >>>End Class
                >>>>
                >>>These are my errors:
                >>>>
                >>>Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
                >>>contain any public member or cannot be found. Make sure the namespace
                >>>or the type is defined and contains at least one public member. Make
                >>>sure the imported element name doesn't use any aliases. C:\Documents
                >>>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
                >>>Projects\Win dowsApplication 3\Form1.vb 1 9 WindowsApplicat ion3
                >>>>
                >>>Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
                >>>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
                >>>Projects\Win dowsApplication 3\Form1.vb 5 30 WindowsApplicat ion3
                >>>>
                >>>Can someone please help this newbe?
                >>>>
                >>>
                >>>
                >>
                >As I pointed out earlier since you are using VB 2005 just use the MS
                >provided WebBroswer control. No need for COM.
                >>
                >Lloyd Sheen
                >
                >
                Cor,

                In VS 2005 there is a WebBroswer control. It does all that the old interop
                would do. I think the poster copied code from somewhere and then added that
                to his source. If he had added a reference to the dll holding the WebBrower
                (don't know the name right now) it would add the interop to his project. In
                VS 2002/3 this is what you did (and in VB6 as well).

                All you need to do is add the WebBroswer from the toolbox and all the
                events, properties and methods are available. As I said you can recreate IE
                in about 10 minutes.

                Lloyd Sheen

                Comment

                • Cor Ligthert [MVP]

                  #9
                  Re: internet explorer

                  Lloyd,

                  I have made about a year ago an article about what you write in the Dutch
                  dotNet newsgroup, how to make your own tabbed webbrowser and as well how to
                  build an editer with the webbrowser control.

                  However there is a use that always everybode who has used this becomes
                  confused of a guy in this newsgroup had spent almost 50 messages replying
                  before after seeing my reply he understood it.

                  You can with the webbrowser COM part build your own webbrowswer, the thing
                  has the name AXSHVDOCvw, however there is as well
                  SHVDOCVW,Intere netExplorer. That opens internet explorer for you and you can
                  use that then.



                  Cor

                  "Lloyd Sheen" <a@b.cschreef in bericht
                  news:22D5A8B2-75E5-4268-862A-0F5461657206@mi crosoft.com...
                  >
                  "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                  news:uw9bZpKgHH A.2640@TK2MSFTN GP06.phx.gbl...
                  >Lloyd,
                  >>
                  >In my idea is (seeing the code) direct Internet Explorer used
                  >(SHDocVW.Inter netExplorer), not the interop AX Com version.
                  >>
                  >Can you tell me how you can do that with the 2.0 webbrowser?
                  >>
                  >Cor
                  >>
                  >"Lloyd Sheen" <a@b.cschreef in bericht
                  >news:EF6EBFE D-1F2C-450D-BC90-29EFD0974FFF@mi crosoft.com...
                  >>>
                  >>"Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                  >>news:uqSyZz7f HHA.4936@TK2MSF TNGP04.phx.gbl. ..
                  >>>Etayki,
                  >>>>
                  >>>You need to set a reference to Internet explorer and than an import. It
                  >>>is always hard to find but it is in the Com tab.
                  >>>>
                  >>>Project -Add Reference -Com (I thought just Internet Explorere) but
                  >>>search yourself it can be a hell of a job by instance because Microsoft
                  >>>uses irregular the internal and the external names.
                  >>>>
                  >>>There is almost not any difference between using in this VB.Net or C#.
                  >>>>
                  >>>As I saw in your code don't you need in VB.Net that nothing, nothing,
                  >>>nothing, what can by anoying in C#.
                  >>>>
                  >>>>
                  >>>"Etayki" <etayluz@gmail. comschreef in bericht
                  >>>news:1176543 881.886568.3627 0@n76g2000hsh.g ooglegroups.com ...
                  >>>>Hi!
                  >>>>>
                  >>>>I am new to VB.net and I am using the Visual Basic 2005 Express
                  >>>>Edition
                  >>>>>
                  >>>>I have two questions:
                  >>>>>
                  >>>>1. I am trying to write an application that will automate Internet
                  >>>>Explorer and store data in a database. Am I better off learning VB.net
                  >>>>or C#.net? Is there a free development environment for C# as well?
                  >>>>>
                  >>>>2. I have followed examples in other posts and copied this code to
                  >>>>open up IE:
                  >>>>>
                  >>>>Imports SHDocVw
                  >>>>Public Class Form1
                  >>>>>
                  >>>> Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
                  >>>>System.Even tArgs) Handles MyBase.Load
                  >>>> Dim wbBrowser As New SHDocVw.Interne tExplorer
                  >>>> wbBrowser.Visib le = True
                  >>>> wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
                  >>>>Nothing, Nothing)
                  >>>> End Sub
                  >>>>End Class
                  >>>>>
                  >>>>These are my errors:
                  >>>>>
                  >>>>Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
                  >>>>contain any public member or cannot be found. Make sure the namespace
                  >>>>or the type is defined and contains at least one public member. Make
                  >>>>sure the imported element name doesn't use any aliases. C:\Documents
                  >>>>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
                  >>>>Projects\Wi ndowsApplicatio n3\Form1.vb 1 9 WindowsApplicat ion3
                  >>>>>
                  >>>>Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
                  >>>>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
                  >>>>Projects\Wi ndowsApplicatio n3\Form1.vb 5 30 WindowsApplicat ion3
                  >>>>>
                  >>>>Can someone please help this newbe?
                  >>>>>
                  >>>>
                  >>>>
                  >>>
                  >>As I pointed out earlier since you are using VB 2005 just use the MS
                  >>provided WebBroswer control. No need for COM.
                  >>>
                  >>Lloyd Sheen
                  >>
                  >>
                  Cor,
                  >
                  In VS 2005 there is a WebBroswer control. It does all that the old
                  interop would do. I think the poster copied code from somewhere and then
                  added that to his source. If he had added a reference to the dll holding
                  the WebBrower (don't know the name right now) it would add the interop to
                  his project. In VS 2002/3 this is what you did (and in VB6 as well).
                  >
                  All you need to do is add the WebBroswer from the toolbox and all the
                  events, properties and methods are available. As I said you can recreate
                  IE in about 10 minutes.
                  >
                  Lloyd Sheen

                  Comment

                  • Etayki

                    #10
                    Re: internet explorer

                    On Apr 18, 7:10 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
                    wrote:
                    Lloyd,
                    >
                    I have made about a year ago an article about what you write in the Dutch
                    dotNet newsgroup, how to make your own tabbed webbrowser and as well how to
                    build an editer with the webbrowser control.
                    >
                    However there is a use that always everybode who has used this becomes
                    confused of a guy in this newsgroup had spent almost 50 messages replying
                    before after seeing my reply he understood it.
                    >
                    You can with the webbrowser COM part build your own webbrowswer, the thing
                    has the name AXSHVDOCvw, however there is as well
                    SHVDOCVW,Intere netExplorer. That opens internet explorer for you and you can
                    use that then.
                    >
                    http://www.vb-tips.com/dbpages.aspx?...6d-a7bd-da738c...
                    >
                    Cor
                    >
                    "Lloyd Sheen" <a...@b.cschree f in berichtnews:22D 5A8B2-75E5-4268-862A-0F5461657206@mi crosoft.com...
                    >
                    >
                    >
                    "Cor Ligthert [MVP]" <notmyfirstn... @planet.nlwrote in message
                    news:uw9bZpKgHH A.2640@TK2MSFTN GP06.phx.gbl...
                    Lloyd,
                    >
                    In my idea is (seeing the code) direct Internet Explorer used
                    (SHDocVW.Intern etExplorer), not the interop AX Com version.
                    >
                    Can you tell me how you can do that with the 2.0 webbrowser?
                    >
                    Cor
                    >
                    "Lloyd Sheen" <a...@b.cschree f in bericht
                    >news:EF6EBFE D-1F2C-450D-BC90-29EFD0974FFF@mi crosoft.com...
                    >
                    >"Cor Ligthert [MVP]" <notmyfirstn... @planet.nlwrote in message
                    >>news:uqSyZz7f HHA.4936@TK2MSF TNGP04.phx.gbl. ..
                    >>Etayki,
                    >
                    >>You need to set a reference to Internet explorer and than an import.It
                    >>is always hard to find but it is in the Com tab.
                    >
                    >>Project -Add Reference -Com (I thought just Internet Explorere) but
                    >>search yourself it can be a hell of a job by instance because Microsoft
                    >>uses irregular the internal and the external names.
                    >
                    >>There is almost not any difference between using in this VB.Net or C#.
                    >
                    >>As I saw in your code don't you need in VB.Net that nothing, nothing,
                    >>nothing, what can by anoying in C#.
                    >
                    >>"Etayki" <etay...@gmail. comschreef in bericht
                    >>>news:1176543 881.886568.3627 0@n76g2000hsh.g ooglegroups.com ...
                    >>>Hi!
                    >
                    >>>I am new to VB.net and I am using the Visual Basic 2005 Express
                    >>>Edition
                    >
                    >>>I have two questions:
                    >
                    >>>1. I am trying to write an application that will automate Internet
                    >>>Explorer and store data in a database. Am I better off learning VB.net
                    >>>or C#.net? Is there a free development environment for C# as well?
                    >
                    >>>2. I have followed examples in other posts and copied this code to
                    >>>open up IE:
                    >
                    >>>Imports SHDocVw
                    >>>Public Class Form1
                    >
                    >>> Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
                    >>>System.Event Args) Handles MyBase.Load
                    >>> Dim wbBrowser As New SHDocVw.Interne tExplorer
                    >>> wbBrowser.Visib le = True
                    >>> wbBrowser.Navig ate("http://www.rediff.com" , Nothing, Nothing,
                    >>>Nothing, Nothing)
                    >>> End Sub
                    >>>End Class
                    >
                    >>>These are my errors:
                    >
                    >>>Warning 1 Namespace or type specified in the Imports 'SHDocVw' doesn't
                    >>>contain any public member or cannot be found. Make sure the namespace
                    >>>or the type is defined and contains at least one public member. Make
                    >>>sure the imported element name doesn't use any aliases. C:\Documents
                    >>>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
                    >>>Projects\Win dowsApplication 3\Form1.vb 1 9 WindowsApplicat ion3
                    >
                    >>>Error 2 Type 'SHDocVw.Intern etExplorer' is not defined. C:\Documents
                    >>>and Settings\Admini strator\Local Settings\Applic ation Data\Temporary
                    >>>Projects\Win dowsApplication 3\Form1.vb 5 30 WindowsApplicat ion3
                    >
                    >>>Can someone please help this newbe?
                    >
                    >As I pointed out earlier since you are using VB 2005 just use the MS
                    >provided WebBroswer control. No need for COM.
                    >
                    >Lloyd Sheen
                    >
                    Cor,
                    >
                    In VS 2005 there is a WebBroswer control. It does all that the old
                    interop would do. I think the poster copied code from somewhere and then
                    added that to his source. If he had added a reference to the dll holding
                    the WebBrower (don't know the name right now) it would add the interop to
                    his project. In VS 2002/3 this is what you did (and in VB6 as well).
                    >
                    All you need to do is add the WebBroswer from the toolbox and all the
                    events, properties and methods are available. As I said you can recreate
                    IE in about 10 minutes.
                    >
                    Lloyd Sheen
                    Thanks for all the help guys.
                    Here is the final code:

                    Imports MSHTML, SHDocVw

                    Dim HTMLDoc As MSHTML.HTMLDocu ment
                    Dim wbBrowser As New SHDocVw.Interne tExplorer
                    Dim iHTMLCol As MSHTML.IHTMLEle mentCollection
                    Dim iHTMLEle As MSHTML.IHTMLEle ment
                    Dim Str As String

                    wbBrowser.Visib le = True
                    wbBrowser.Navig ate("http://search.msn.com/results.aspx?q= etay+
                    %7Bpopl%3D0%7D+ %7Bmtch%3D100%7 D+language%3Ahe +site
                    %3Aco.il&form=Q BRE&go.x=17&go. y=10", Nothing, Nothing, Nothing,
                    Nothing)
                    Do
                    Loop Until Not wbBrowser.Busy

                    HTMLDoc = wbBrowser.Docum ent
                    iHTMLCol = HTMLDoc.getElem entsByTagName(" input")
                    For Each iHTMLEle In iHTMLCol
                    If Not iHTMLEle.getAtt ribute("name") Is Nothing Then
                    Str = iHTMLEle.getAtt ribute("name"). ToString
                    If Str = "q" Then
                    iHTMLEle.setAtt ribute("value", "איתי" + " {popl=0}
                    {mtch=100} language:he site:co.il")
                    Exit For
                    End If
                    End If
                    Next
                    Do
                    Loop Until Not wbBrowser.Busy

                    For Each iHTMLEle In iHTMLCol
                    If Not iHTMLEle.getAtt ribute("name") Is Nothing Then
                    Str = iHTMLEle.getAtt ribute("name"). ToString
                    If Str = "go" Then
                    iHTMLEle.click( )
                    Exit For
                    End If
                    End If
                    Next
                    Do
                    Loop Until Not wbBrowser.Busy

                    Comment

                    Working...