dumb question

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

    #1

    dumb question

    in VS .net vb 2005 express,
    I failed to find the option for leaving out warning in the Errors tab but
    still leave Warning in the warning tab listing.

    Can someone give me some hints? thank you for your time and advice


  • rowe_newsgroups

    #2
    Re: dumb question

    What kind of warnings are you getting? It might be a good idea to
    address them, as warnings tend to turn into runtime errors.

    Thanks,

    Seth Rowe

    GS wrote:
    in VS .net vb 2005 express,
    I failed to find the option for leaving out warning in the Errors tab but
    still leave Warning in the warning tab listing.
    >
    Can someone give me some hints? thank you for your time and advice

    Comment

    • GS

      #3
      Re: dumb question

      Warning 1 Access of shared member, constant member, enum member or nested
      type through an instance;
      qualifying expression will not be evaluated.
      D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp

      the code
      Private Sub openMI_Click(By Val sender As System.Object, ByVal e As
      System.EventArg s) Handles openMI.Click
      Dim od As New OpenDialog()

      Dim myDialogResult As DialogResult = od.ShowDialog(M e)
      If myDialogResult = DialogResult.OK Then
      ShowUrl(od.Path OrUrl)
      End If
      End Sub

      the above code is from some example on WebOChost control, Since there is no
      plan to use it and don't know how to fix it, I just want to ignore it for
      now

      The reason I want to separate listing of error and warning is that I can
      quickly address the errors first during developement and as long as the
      number of the warning
      in the warning tab reamins same I would ignore for now. they are either
      from OLE structure or like the above - not critical now

      I am trying come up with a quick runnable demo of concepts

      Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
      Public Event CommandStateCha nge(ByVal Sender As Object, ByVal E As
      AxSHDocVw.DWebB rowserEvents2_C ommandStateChan geEvent)

      Warning 1 Access of shared member, constant member, enum member or nested
      type through an instance; qualifying expression will not be evaluated.
      D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
      Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
      Warning 3 Type of member 'cwActual' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 6 12 myApp
      Warning 4 Type of member 'cwBuf' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 7 12 myApp
      Warning 5 Type of member 'cmdf' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 14 12 myApp
      Warning 6 Type of parameter 'cCmds' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 27 56 myApp
      Warning 7 Access of shared member, constant member, enum member or nested
      type through an instance; qualifying expression will not be evaluated.
      D:\data\IeI\gp\ AppCom\myApp\Op enDialog.vb 162 27 myApp
      Warning 8 Type of parameter 'E' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 15 67 myApp
      Warning 9 Type of parameter 'e' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 20 65 myApp
      Warning 10 Type of parameter 'e' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 21 73 myApp


      Warning 11 Type of parameter 'e' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 22 74 myApp
      Public Event TopLevelNavigat eComplete2(ByVa l sender As Object, ByVal e
      As AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event)

      Warning 12 Return type of function 'HtmlDocument' is not CLS-compliant.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 131 30 myApp
      Public ReadOnly Property HtmlDocument() As mshtml.HTMLDocu ment
      the below are used in webBrowser's OLE execute command like
      Dim cmdt As IOleCommandTarg et
      Dim o As Object

      ' If the doc object isn't set to anything, or there's
      ' some bizarre error in accessing IOleCommandTarg et,
      ' exit gracefully.
      Try
      cmdt = CType(doc, IOleCommandTarg et)
      cmdt.Exec(cmdGU ID, MiscCommandTarg et.ViewSource,
      SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT , o, o)
      Catch
      Throw (New Exception(Err.G etException().M essage))
      End Try

      Warning 14 Variable 'o' is passed by reference before it has been assigned a
      value. A null reference exception could result at runtime.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 247 109 myApp
      Warning 15 Variable 'o' is passed by reference before it has been assigned a
      value. A null reference exception could result at runtime.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 262 103 myApp
      Warning 16 Variable 'o' is passed by reference before it has been assigned a
      value. A null reference exception could result at runtime.
      D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 277 106 myApp




      "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
      news:1158119369 .461775.225990@ e3g2000cwe.goog legroups.com...
      What kind of warnings are you getting? It might be a good idea to
      address them, as warnings tend to turn into runtime errors.
      >
      Thanks,
      >
      Seth Rowe
      >
      GS wrote:
      in VS .net vb 2005 express,
      I failed to find the option for leaving out warning in the Errors tab
      but
      still leave Warning in the warning tab listing.

      Can someone give me some hints? thank you for your time and advice
      >

      Comment

      • rowe_newsgroups

        #4
        Re: dumb question

        That's a lot of warnings! I'll take a better look later but here's some
        of the warnings you should fix:
        Warning 1 Access of shared member, constant member, enum member or nested
        type through an instance;
        Shared methods operate independantly from an instance's methods, and
        aren't available to an instance of the class. This warning tells you
        that you are trying to access a shared method and that it's not
        evaluating the code. You'll want to call the method through the class
        instead of an instance.
        Warning 16 Variable 'o' is passed by reference before it has been assigned a
        value. A null reference exception could result at runtime.
        Without seeing all your code it's difficult to tell you how to fix
        this, but it could be as simple as replacing Dim o as Object with Dim o
        as New Object, or by passing the value with ByVal if you're not
        changing the value (or use a function if you need to change the value).
        Warning 9 Type of parameter 'e' is not CLS-compliant.
        I believe e is sort of a reserved parameter of the Type
        System.EventArg s so using it as a different type may raise this warning
        (just a guess)
        The reason I want to separate listing of error and warning is that I can
        quickly address the errors first during developement
        If you open the error list tab, right below the title bar are three
        toggle buttons:
        {} Error, {} Warning, and {} Messages. Clicking on these will toggle
        them on and off. However, you should always try to resolve any warning
        messages that you can.

        Hope that helps,

        Seth Rowe


        GS wrote:
        Warning 1 Access of shared member, constant member, enum member or nested
        type through an instance;
        qualifying expression will not be evaluated.
        D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
        >
        the code
        Private Sub openMI_Click(By Val sender As System.Object, ByVal e As
        System.EventArg s) Handles openMI.Click
        Dim od As New OpenDialog()
        >
        Dim myDialogResult As DialogResult = od.ShowDialog(M e)
        If myDialogResult = DialogResult.OK Then
        ShowUrl(od.Path OrUrl)
        End If
        End Sub
        >
        the above code is from some example on WebOChost control, Since there is no
        plan to use it and don't know how to fix it, I just want to ignore it for
        now
        >
        The reason I want to separate listing of error and warning is that I can
        quickly address the errors first during developement and as long as the
        number of the warning
        in the warning tab reamins same I would ignore for now. they are either
        from OLE structure or like the above - not critical now
        >
        I am trying come up with a quick runnable demo of concepts
        >
        Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
        Public Event CommandStateCha nge(ByVal Sender As Object, ByVal E As
        AxSHDocVw.DWebB rowserEvents2_C ommandStateChan geEvent)
        >
        Warning 1 Access of shared member, constant member, enum member or nested
        type through an instance; qualifying expression will not be evaluated.
        D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
        Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
        Warning 3 Type of member 'cwActual' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 6 12 myApp
        Warning 4 Type of member 'cwBuf' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 7 12 myApp
        Warning 5 Type of member 'cmdf' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 14 12 myApp
        Warning 6 Type of parameter 'cCmds' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 27 56 myApp
        Warning 7 Access of shared member, constant member, enum member or nested
        type through an instance; qualifying expression will not be evaluated.
        D:\data\IeI\gp\ AppCom\myApp\Op enDialog.vb 162 27 myApp
        Warning 8 Type of parameter 'E' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 15 67 myApp
        Warning 9 Type of parameter 'e' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 20 65 myApp
        Warning 10 Type of parameter 'e' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 21 73 myApp
        >
        >
        Warning 11 Type of parameter 'e' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 22 74 myApp
        Public Event TopLevelNavigat eComplete2(ByVa l sender As Object, ByVal e
        As AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event)
        >
        Warning 12 Return type of function 'HtmlDocument' is not CLS-compliant.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 131 30 myApp
        Public ReadOnly Property HtmlDocument() As mshtml.HTMLDocu ment
        the below are used in webBrowser's OLE execute command like
        Dim cmdt As IOleCommandTarg et
        Dim o As Object
        >
        ' If the doc object isn't set to anything, or there's
        ' some bizarre error in accessing IOleCommandTarg et,
        ' exit gracefully.
        Try
        cmdt = CType(doc, IOleCommandTarg et)
        cmdt.Exec(cmdGU ID, MiscCommandTarg et.ViewSource,
        SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT , o, o)
        Catch
        Throw (New Exception(Err.G etException().M essage))
        End Try
        >
        Warning 14 Variable 'o' is passed by reference before it has been assigned a
        value. A null reference exception could result at runtime.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 247 109 myApp
        Warning 15 Variable 'o' is passed by reference before it has been assigned a
        value. A null reference exception could result at runtime.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 262 103 myApp
        Warning 16 Variable 'o' is passed by reference before it has been assigned a
        value. A null reference exception could result at runtime.
        D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 277 106 myApp
        >
        >
        >
        >
        "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
        news:1158119369 .461775.225990@ e3g2000cwe.goog legroups.com...
        What kind of warnings are you getting? It might be a good idea to
        address them, as warnings tend to turn into runtime errors.

        Thanks,

        Seth Rowe

        GS wrote:
        in VS .net vb 2005 express,
        I failed to find the option for leaving out warning in the Errors tab
        but
        still leave Warning in the warning tab listing.
        >
        Can someone give me some hints? thank you for your time and advice

        Comment

        • GS

          #5
          Re: dumb question

          thx very much.

          I still don't get it. the method Private Sub openMI_Click(By Val sender
          As System.Object, ByVal e As System.EventArg s) Handles openMI.Click
          Dim od As New OpenDialog()

          Dim myDialogResult As DialogResult = od.ShowDialog(M e)
          If myDialogResult = DialogResult.OK Then ' warning for
          DialogResult.OK
          ShowUrl(od.Path OrUrl)
          End If
          End Sub
          I thought
          DialogResult.OK is sort of constant (property, probably shared). I
          actually tested the menu item and it did open a dialog for accepting an
          valid URL and get ShowUrl() to navigate the browser to that successfully

          So the warning is somewhat moot



          "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
          news:1158152850 .160809.149000@ i3g2000cwc.goog legroups.com...
          That's a lot of warnings! I'll take a better look later but here's some
          of the warnings you should fix:
          >
          Warning 1 Access of shared member, constant member, enum member or
          nested
          type through an instance;
          >
          Shared methods operate independantly from an instance's methods, and
          aren't available to an instance of the class. This warning tells you
          that you are trying to access a shared method and that it's not
          evaluating the code. You'll want to call the method through the class
          instead of an instance.
          >
          Warning 16 Variable 'o' is passed by reference before it has been
          assigned a
          value. A null reference exception could result at runtime.
          >
          Without seeing all your code it's difficult to tell you how to fix
          this, but it could be as simple as replacing Dim o as Object with Dim o
          as New Object, or by passing the value with ByVal if you're not
          changing the value (or use a function if you need to change the value).
          >
          Warning 9 Type of parameter 'e' is not CLS-compliant.
          >
          I believe e is sort of a reserved parameter of the Type
          System.EventArg s so using it as a different type may raise this warning
          (just a guess)
          >
          The reason I want to separate listing of error and warning is that I can
          quickly address the errors first during developement
          >
          If you open the error list tab, right below the title bar are three
          toggle buttons:
          {} Error, {} Warning, and {} Messages. Clicking on these will toggle
          them on and off. However, you should always try to resolve any warning
          messages that you can.
          >
          Hope that helps,
          >
          Seth Rowe
          >
          >
          GS wrote:
          Warning 1 Access of shared member, constant member, enum member or
          nested
          type through an instance;
          qualifying expression will not be evaluated.
          D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp

          the code
          Private Sub openMI_Click(By Val sender As System.Object, ByVal e As
          System.EventArg s) Handles openMI.Click
          Dim od As New OpenDialog()

          Dim myDialogResult As DialogResult = od.ShowDialog(M e)
          If myDialogResult = DialogResult.OK Then
          ShowUrl(od.Path OrUrl)
          End If
          End Sub

          the above code is from some example on WebOChost control, Since there is
          no
          plan to use it and don't know how to fix it, I just want to ignore it
          for
          now

          The reason I want to separate listing of error and warning is that I can
          quickly address the errors first during developement and as long as the
          number of the warning
          in the warning tab reamins same I would ignore for now. they are either
          from OLE structure or like the above - not critical now

          I am trying come up with a quick runnable demo of concepts

          Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
          Public Event CommandStateCha nge(ByVal Sender As Object, ByVal E As
          AxSHDocVw.DWebB rowserEvents2_C ommandStateChan geEvent)

          Warning 1 Access of shared member, constant member, enum member or
          nested
          type through an instance; qualifying expression will not be evaluated.
          D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
          Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
          Warning 3 Type of member 'cwActual' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 6 12 myApp
          Warning 4 Type of member 'cwBuf' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 7 12 myApp
          Warning 5 Type of member 'cmdf' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 14 12 myApp
          Warning 6 Type of parameter 'cCmds' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 27 56 myApp
          Warning 7 Access of shared member, constant member, enum member or
          nested
          type through an instance; qualifying expression will not be evaluated.
          D:\data\IeI\gp\ AppCom\myApp\Op enDialog.vb 162 27 myApp
          Warning 8 Type of parameter 'E' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 15 67 myApp
          Warning 9 Type of parameter 'e' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 20 65 myApp
          Warning 10 Type of parameter 'e' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 21 73 myApp


          Warning 11 Type of parameter 'e' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 22 74 myApp
          Public Event TopLevelNavigat eComplete2(ByVa l sender As Object, ByVal
          e
          As AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event)

          Warning 12 Return type of function 'HtmlDocument' is not CLS-compliant.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 131 30 myApp
          Public ReadOnly Property HtmlDocument() As mshtml.HTMLDocu ment
          the below are used in webBrowser's OLE execute command like
          Dim cmdt As IOleCommandTarg et
          Dim o As Object

          ' If the doc object isn't set to anything, or there's
          ' some bizarre error in accessing IOleCommandTarg et,
          ' exit gracefully.
          Try
          cmdt = CType(doc, IOleCommandTarg et)
          cmdt.Exec(cmdGU ID, MiscCommandTarg et.ViewSource,
          SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT , o, o)
          Catch
          Throw (New Exception(Err.G etException().M essage))
          End Try

          Warning 14 Variable 'o' is passed by reference before it has been
          assigned a
          value. A null reference exception could result at runtime.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 247 109 myApp
          Warning 15 Variable 'o' is passed by reference before it has been
          assigned a
          value. A null reference exception could result at runtime.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 262 103 myApp
          Warning 16 Variable 'o' is passed by reference before it has been
          assigned a
          value. A null reference exception could result at runtime.
          D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 277 106 myApp




          "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
          news:1158119369 .461775.225990@ e3g2000cwe.goog legroups.com...
          What kind of warnings are you getting? It might be a good idea to
          address them, as warnings tend to turn into runtime errors.
          >
          Thanks,
          >
          Seth Rowe
          >
          GS wrote:
          in VS .net vb 2005 express,
          I failed to find the option for leaving out warning in the Errors
          tab
          but
          still leave Warning in the warning tab listing.

          Can someone give me some hints? thank you for your time and advice
          >
          >

          Comment

          • rowe_newsgroups

            #6
            Re: dumb question

            If you have access to the source code then you could remove the Shared
            keyword from the constant if you wanted, but like you said it doesn't
            seem to matter. - I am obcessive compulsive when it comes to warning
            messages : )

            Thanks,

            Seth Rowe

            GS wrote:
            thx very much.
            >
            I still don't get it. the method Private Sub openMI_Click(By Val sender
            As System.Object, ByVal e As System.EventArg s) Handles openMI.Click
            Dim od As New OpenDialog()
            >
            Dim myDialogResult As DialogResult = od.ShowDialog(M e)
            If myDialogResult = DialogResult.OK Then ' warning for
            DialogResult.OK
            ShowUrl(od.Path OrUrl)
            End If
            End Sub
            I thought
            DialogResult.OK is sort of constant (property, probably shared). I
            actually tested the menu item and it did open a dialog for accepting an
            valid URL and get ShowUrl() to navigate the browser to that successfully
            >
            So the warning is somewhat moot
            >
            >
            >
            "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
            news:1158152850 .160809.149000@ i3g2000cwc.goog legroups.com...
            That's a lot of warnings! I'll take a better look later but here's some
            of the warnings you should fix:
            Warning 1 Access of shared member, constant member, enum member or
            nested
            type through an instance;
            Shared methods operate independantly from an instance's methods, and
            aren't available to an instance of the class. This warning tells you
            that you are trying to access a shared method and that it's not
            evaluating the code. You'll want to call the method through the class
            instead of an instance.
            Warning 16 Variable 'o' is passed by reference before it has been
            assigned a
            value. A null reference exception could result at runtime.
            Without seeing all your code it's difficult to tell you how to fix
            this, but it could be as simple as replacing Dim o as Object with Dim o
            as New Object, or by passing the value with ByVal if you're not
            changing the value (or use a function if you need to change the value).
            Warning 9 Type of parameter 'e' is not CLS-compliant.
            I believe e is sort of a reserved parameter of the Type
            System.EventArg s so using it as a different type may raise this warning
            (just a guess)
            The reason I want to separate listing of error and warning is that I can
            quickly address the errors first during developement
            If you open the error list tab, right below the title bar are three
            toggle buttons:
            {} Error, {} Warning, and {} Messages. Clicking on these will toggle
            them on and off. However, you should always try to resolve any warning
            messages that you can.

            Hope that helps,

            Seth Rowe


            GS wrote:
            Warning 1 Access of shared member, constant member, enum member or
            nested
            type through an instance;
            qualifying expression will not be evaluated.
            D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
            >
            the code
            Private Sub openMI_Click(By Val sender As System.Object, ByVal e As
            System.EventArg s) Handles openMI.Click
            Dim od As New OpenDialog()
            >
            Dim myDialogResult As DialogResult = od.ShowDialog(M e)
            If myDialogResult = DialogResult.OK Then
            ShowUrl(od.Path OrUrl)
            End If
            End Sub
            >
            the above code is from some example on WebOChost control, Since there is
            no
            plan to use it and don't know how to fix it, I just want to ignore it
            for
            now
            >
            The reason I want to separate listing of error and warning is that I can
            quickly address the errors first during developement and as long as the
            number of the warning
            in the warning tab reamins same I would ignore for now. they are either
            from OLE structure or like the above - not critical now
            >
            I am trying come up with a quick runnable demo of concepts
            >
            Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
            Public Event CommandStateCha nge(ByVal Sender As Object, ByVal E As
            AxSHDocVw.DWebB rowserEvents2_C ommandStateChan geEvent)
            >
            Warning 1 Access of shared member, constant member, enum member or
            nested
            type through an instance; qualifying expression will not be evaluated.
            D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
            Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
            Warning 3 Type of member 'cwActual' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 6 12 myApp
            Warning 4 Type of member 'cwBuf' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 7 12 myApp
            Warning 5 Type of member 'cmdf' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 14 12 myApp
            Warning 6 Type of parameter 'cCmds' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 27 56 myApp
            Warning 7 Access of shared member, constant member, enum member or
            nested
            type through an instance; qualifying expression will not be evaluated.
            D:\data\IeI\gp\ AppCom\myApp\Op enDialog.vb 162 27 myApp
            Warning 8 Type of parameter 'E' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 15 67 myApp
            Warning 9 Type of parameter 'e' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 20 65 myApp
            Warning 10 Type of parameter 'e' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 21 73 myApp
            >
            >
            Warning 11 Type of parameter 'e' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 22 74 myApp
            Public Event TopLevelNavigat eComplete2(ByVa l sender As Object, ByVal
            e
            As AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event)
            >
            Warning 12 Return type of function 'HtmlDocument' is not CLS-compliant.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 131 30 myApp
            Public ReadOnly Property HtmlDocument() As mshtml.HTMLDocu ment
            the below are used in webBrowser's OLE execute command like
            Dim cmdt As IOleCommandTarg et
            Dim o As Object
            >
            ' If the doc object isn't set to anything, or there's
            ' some bizarre error in accessing IOleCommandTarg et,
            ' exit gracefully.
            Try
            cmdt = CType(doc, IOleCommandTarg et)
            cmdt.Exec(cmdGU ID, MiscCommandTarg et.ViewSource,
            SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT , o, o)
            Catch
            Throw (New Exception(Err.G etException().M essage))
            End Try
            >
            Warning 14 Variable 'o' is passed by reference before it has been
            assigned a
            value. A null reference exception could result at runtime.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 247 109 myApp
            Warning 15 Variable 'o' is passed by reference before it has been
            assigned a
            value. A null reference exception could result at runtime.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 262 103 myApp
            Warning 16 Variable 'o' is passed by reference before it has been
            assigned a
            value. A null reference exception could result at runtime.
            D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 277 106 myApp
            >
            >
            >
            >
            "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
            news:1158119369 .461775.225990@ e3g2000cwe.goog legroups.com...
            What kind of warnings are you getting? It might be a good idea to
            address them, as warnings tend to turn into runtime errors.

            Thanks,

            Seth Rowe

            GS wrote:
            in VS .net vb 2005 express,
            I failed to find the option for leaving out warning in the Errors
            tab
            but
            still leave Warning in the warning tab listing.
            >
            Can someone give me some hints? thank you for your time and advice

            Comment

            • GS

              #7
              Re: dumb question

              I usually would like to take care of the warnings too. as for
              DialogResult.OK being shared I have no control as it was part of the
              framework. I looked into the help before but could not figure out a
              solution. As it turned out it was bogus warning.

              The only thing I am serious concerned about is the one related to warning
              #12, and the olecmd saveas function

              ' save a document into file specified by filespec string
              Public Sub saveAs(ByVal strFileSpec As String)
              Dim doOpt As SHDocVw.OLECMDE XECOPT
              doOpt = SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER

              MsgBox("SHDocVw .OLECMDEXECOPT. OLECMDEXECOPT_D ONTPROMPTUSER=" &
              vbCrLf & SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER,
              MsgBoxStyle.Inf ormation, "SaveAs @debug")
              Dim o As New Object()
              Try
              webBrowser.Exec WB(SHDocVw.OLEC MDID.OLECMDID_S AVEAS, doOpt,
              CType(strFileSp ec, Object), o)
              Catch
              Throw (New Exception(Err.G etException().M essage))
              End Try
              End Sub ' saveAs

              It does saveas but with prompt which I dont want.


              Aha, I fount the discrepancies. supposedly
              public struct OLECMDTEXT
              {
              public uint cmdtextf;
              public uint cwActual;
              public uint cwBuf;
              [MarshalAs(Unman agedType.ByValT Str,SizeConst=1 00)]public char rgwz;
              }
              // I have trouble translating the above to vb
              // tried
              // <MarshalAs(Unma nagedType.ByVal TStr,SizeConst= 100)>public char rgwz;
              // also
              // <MarshalAs(Unma nagedType.ByVal TStr,SizeConst As Integer =100)>public char
              rgwz;
              //
              [StructLayout(La youtKind.Sequen tial)]
              public struct OLECMD
              {
              public uint cmdID;
              public uint cmdf;
              }


              But the example source code has Long in place of unit
              <StructLayout(L ayoutKind.Seque ntial)_
              Public Structure OLECMDTEXT
              Public cmdtextf As UInt32
              Public cwActual As UInt32
              Public cwBuf As UInt32
              Public rgwz As Char
              End Structure

              <StructLayout(L ayoutKind.Seque ntial)_
              Public Structure OLECMD
              Public cmdID As Long ' <== should be Uint32
              Public cmdf As UInt64 ' <== should be unit32 according to KB329014
              End Structure


              despite the changes, I still have the prompt popping up on me
              "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
              news:1158157378 .179335.120460@ p79g2000cwp.goo glegroups.com.. .
              If you have access to the source code then you could remove the Shared
              keyword from the constant if you wanted, but like you said it doesn't
              seem to matter. - I am obcessive compulsive when it comes to warning
              messages : )
              >
              Thanks,
              >
              Seth Rowe
              >
              GS wrote:
              thx very much.

              I still don't get it. the method Private Sub openMI_Click(By Val
              sender
              As System.Object, ByVal e As System.EventArg s) Handles openMI.Click
              Dim od As New OpenDialog()

              Dim myDialogResult As DialogResult = od.ShowDialog(M e)
              If myDialogResult = DialogResult.OK Then ' warning for
              DialogResult.OK
              ShowUrl(od.Path OrUrl)
              End If
              End Sub
              I thought
              DialogResult.OK is sort of constant (property, probably shared). I
              actually tested the menu item and it did open a dialog for accepting an
              valid URL and get ShowUrl() to navigate the browser to that successfully

              So the warning is somewhat moot



              "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
              news:1158152850 .160809.149000@ i3g2000cwc.goog legroups.com...
              That's a lot of warnings! I'll take a better look later but here's
              some
              of the warnings you should fix:
              >
              Warning 1 Access of shared member, constant member, enum member or
              nested
              type through an instance;
              >
              Shared methods operate independantly from an instance's methods, and
              aren't available to an instance of the class. This warning tells you
              that you are trying to access a shared method and that it's not
              evaluating the code. You'll want to call the method through the class
              instead of an instance.
              >
              Warning 16 Variable 'o' is passed by reference before it has been
              assigned a
              value. A null reference exception could result at runtime.
              >
              Without seeing all your code it's difficult to tell you how to fix
              this, but it could be as simple as replacing Dim o as Object with Dim
              o
              as New Object, or by passing the value with ByVal if you're not
              changing the value (or use a function if you need to change the
              value).
              >
              Warning 9 Type of parameter 'e' is not CLS-compliant.
              >
              I believe e is sort of a reserved parameter of the Type
              System.EventArg s so using it as a different type may raise this
              warning
              (just a guess)
              >
              The reason I want to separate listing of error and warning is that I
              can
              quickly address the errors first during developement
              >
              If you open the error list tab, right below the title bar are three
              toggle buttons:
              {} Error, {} Warning, and {} Messages. Clicking on these will toggle
              them on and off. However, you should always try to resolve any warning
              messages that you can.
              >
              Hope that helps,
              >
              Seth Rowe
              >
              >
              GS wrote:
              Warning 1 Access of shared member, constant member, enum member or
              nested
              type through an instance;
              qualifying expression will not be evaluated.
              D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp

              the code
              Private Sub openMI_Click(By Val sender As System.Object, ByVal e
              As
              System.EventArg s) Handles openMI.Click
              Dim od As New OpenDialog()

              Dim myDialogResult As DialogResult = od.ShowDialog(M e)
              If myDialogResult = DialogResult.OK Then
              ShowUrl(od.Path OrUrl)
              End If
              End Sub

              the above code is from some example on WebOChost control, Since
              there is
              no
              plan to use it and don't know how to fix it, I just want to ignore
              it
              for
              now

              The reason I want to separate listing of error and warning is that I
              can
              quickly address the errors first during developement and as long as
              the
              number of the warning
              in the warning tab reamins same I would ignore for now. they are
              either
              from OLE structure or like the above - not critical now

              I am trying come up with a quick runnable demo of concepts

              Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
              Public Event CommandStateCha nge(ByVal Sender As Object, ByVal E
              As
              AxSHDocVw.DWebB rowserEvents2_C ommandStateChan geEvent)

              Warning 1 Access of shared member, constant member, enum member or
              nested
              type through an instance; qualifying expression will not be
              evaluated.
              D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
              Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
              Warning 3 Type of member 'cwActual' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 6 12 myApp
              Warning 4 Type of member 'cwBuf' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 7 12 myApp
              Warning 5 Type of member 'cmdf' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 14 12 myApp
              Warning 6 Type of parameter 'cCmds' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 27 56 myApp
              Warning 7 Access of shared member, constant member, enum member or
              nested
              type through an instance; qualifying expression will not be
              evaluated.
              D:\data\IeI\gp\ AppCom\myApp\Op enDialog.vb 162 27 myApp
              Warning 8 Type of parameter 'E' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 15 67 myApp
              Warning 9 Type of parameter 'e' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 20 65 myApp
              Warning 10 Type of parameter 'e' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 21 73 myApp


              Warning 11 Type of parameter 'e' is not CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 22 74 myApp
              Public Event TopLevelNavigat eComplete2(ByVa l sender As Object,
              ByVal
              e
              As AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event)

              Warning 12 Return type of function 'HtmlDocument' is not
              CLS-compliant.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 131 30 myApp
              Public ReadOnly Property HtmlDocument() As mshtml.HTMLDocu ment
              the below are used in webBrowser's OLE execute command like
              Dim cmdt As IOleCommandTarg et
              Dim o As Object

              ' If the doc object isn't set to anything, or there's
              ' some bizarre error in accessing IOleCommandTarg et,
              ' exit gracefully.
              Try
              cmdt = CType(doc, IOleCommandTarg et)
              cmdt.Exec(cmdGU ID, MiscCommandTarg et.ViewSource,
              SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT , o, o)
              Catch
              Throw (New Exception(Err.G etException().M essage))
              End Try

              Warning 14 Variable 'o' is passed by reference before it has been
              assigned a
              value. A null reference exception could result at runtime.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 247 109 myApp
              Warning 15 Variable 'o' is passed by reference before it has been
              assigned a
              value. A null reference exception could result at runtime.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 262 103 myApp
              Warning 16 Variable 'o' is passed by reference before it has been
              assigned a
              value. A null reference exception could result at runtime.
              D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 277 106 myApp




              "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
              news:1158119369 .461775.225990@ e3g2000cwe.goog legroups.com...
              What kind of warnings are you getting? It might be a good idea to
              address them, as warnings tend to turn into runtime errors.
              >
              Thanks,
              >
              Seth Rowe
              >
              GS wrote:
              in VS .net vb 2005 express,
              I failed to find the option for leaving out warning in the
              Errors
              tab
              but
              still leave Warning in the warning tab listing.

              Can someone give me some hints? thank you for your time and
              advice
              >
              >
              >

              Comment

              • rowe_newsgroups

                #8
                Re: dumb question

                You've got me on that one. Maybe one of the gurus can help.

                Good Luck!

                Seth Rowe

                GS wrote:
                I usually would like to take care of the warnings too. as for
                DialogResult.OK being shared I have no control as it was part of the
                framework. I looked into the help before but could not figure out a
                solution. As it turned out it was bogus warning.
                >
                The only thing I am serious concerned about is the one related to warning
                #12, and the olecmd saveas function
                >
                ' save a document into file specified by filespec string
                Public Sub saveAs(ByVal strFileSpec As String)
                Dim doOpt As SHDocVw.OLECMDE XECOPT
                doOpt = SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER
                >
                MsgBox("SHDocVw .OLECMDEXECOPT. OLECMDEXECOPT_D ONTPROMPTUSER=" &
                vbCrLf & SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER,
                MsgBoxStyle.Inf ormation, "SaveAs @debug")
                Dim o As New Object()
                Try
                webBrowser.Exec WB(SHDocVw.OLEC MDID.OLECMDID_S AVEAS, doOpt,
                CType(strFileSp ec, Object), o)
                Catch
                Throw (New Exception(Err.G etException().M essage))
                End Try
                End Sub ' saveAs
                >
                It does saveas but with prompt which I dont want.
                >
                >
                Aha, I fount the discrepancies. supposedly
                public struct OLECMDTEXT
                {
                public uint cmdtextf;
                public uint cwActual;
                public uint cwBuf;
                [MarshalAs(Unman agedType.ByValT Str,SizeConst=1 00)]public char rgwz;
                }
                // I have trouble translating the above to vb
                // tried
                // <MarshalAs(Unma nagedType.ByVal TStr,SizeConst= 100)>public char rgwz;
                // also
                // <MarshalAs(Unma nagedType.ByVal TStr,SizeConst As Integer =100)>public char
                rgwz;
                //
                [StructLayout(La youtKind.Sequen tial)]
                public struct OLECMD
                {
                public uint cmdID;
                public uint cmdf;
                }
                >
                >
                But the example source code has Long in place of unit
                <StructLayout(L ayoutKind.Seque ntial)_
                Public Structure OLECMDTEXT
                Public cmdtextf As UInt32
                Public cwActual As UInt32
                Public cwBuf As UInt32
                Public rgwz As Char
                End Structure
                >
                <StructLayout(L ayoutKind.Seque ntial)_
                Public Structure OLECMD
                Public cmdID As Long ' <== should be Uint32
                Public cmdf As UInt64 ' <== should be unit32 according to KB329014
                End Structure
                >
                >
                despite the changes, I still have the prompt popping up on me
                "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
                news:1158157378 .179335.120460@ p79g2000cwp.goo glegroups.com.. .
                If you have access to the source code then you could remove the Shared
                keyword from the constant if you wanted, but like you said it doesn't
                seem to matter. - I am obcessive compulsive when it comes to warning
                messages : )

                Thanks,

                Seth Rowe

                GS wrote:
                thx very much.
                >
                I still don't get it. the method Private Sub openMI_Click(By Val
                sender
                As System.Object, ByVal e As System.EventArg s) Handles openMI.Click
                Dim od As New OpenDialog()
                >
                Dim myDialogResult As DialogResult = od.ShowDialog(M e)
                If myDialogResult = DialogResult.OK Then ' warning for
                DialogResult.OK
                ShowUrl(od.Path OrUrl)
                End If
                End Sub
                I thought
                DialogResult.OK is sort of constant (property, probably shared). I
                actually tested the menu item and it did open a dialog for accepting an
                valid URL and get ShowUrl() to navigate the browser to that successfully
                >
                So the warning is somewhat moot
                >
                >
                >
                "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
                news:1158152850 .160809.149000@ i3g2000cwc.goog legroups.com...
                That's a lot of warnings! I'll take a better look later but here's
                some
                of the warnings you should fix:

                Warning 1 Access of shared member, constant member, enum member or
                nested
                type through an instance;

                Shared methods operate independantly from an instance's methods, and
                aren't available to an instance of the class. This warning tells you
                that you are trying to access a shared method and that it's not
                evaluating the code. You'll want to call the method through the class
                instead of an instance.

                Warning 16 Variable 'o' is passed by reference before it has been
                assigned a
                value. A null reference exception could result at runtime.

                Without seeing all your code it's difficult to tell you how to fix
                this, but it could be as simple as replacing Dim o as Object with Dim
                o
                as New Object, or by passing the value with ByVal if you're not
                changing the value (or use a function if you need to change the
                value).

                Warning 9 Type of parameter 'e' is not CLS-compliant.

                I believe e is sort of a reserved parameter of the Type
                System.EventArg s so using it as a different type may raise this
                warning
                (just a guess)

                The reason I want to separate listing of error and warning is that I
                can
                quickly address the errors first during developement

                If you open the error list tab, right below the title bar are three
                toggle buttons:
                {} Error, {} Warning, and {} Messages. Clicking on these will toggle
                them on and off. However, you should always try to resolve any warning
                messages that you can.

                Hope that helps,

                Seth Rowe


                GS wrote:
                Warning 1 Access of shared member, constant member, enum member or
                nested
                type through an instance;
                qualifying expression will not be evaluated.
                D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
                >
                the code
                Private Sub openMI_Click(By Val sender As System.Object, ByVal e
                As
                System.EventArg s) Handles openMI.Click
                Dim od As New OpenDialog()
                >
                Dim myDialogResult As DialogResult = od.ShowDialog(M e)
                If myDialogResult = DialogResult.OK Then
                ShowUrl(od.Path OrUrl)
                End If
                End Sub
                >
                the above code is from some example on WebOChost control, Since
                there is
                no
                plan to use it and don't know how to fix it, I just want to ignore
                it
                for
                now
                >
                The reason I want to separate listing of error and warning is that I
                can
                quickly address the errors first during developement and as long as
                the
                number of the warning
                in the warning tab reamins same I would ignore for now. they are
                either
                from OLE structure or like the above - not critical now
                >
                I am trying come up with a quick runnable demo of concepts
                >
                Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
                Public Event CommandStateCha nge(ByVal Sender As Object, ByVal E
                As
                AxSHDocVw.DWebB rowserEvents2_C ommandStateChan geEvent)
                >
                Warning 1 Access of shared member, constant member, enum member or
                nested
                type through an instance; qualifying expression will not be
                evaluated.
                D:\data\IeI\gp\ AppCom\myApp\Fo rmmyApp.vb 674 29 myApp
                Warning 2 Type of member 'cmdtextf' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 5 12 myApp
                Warning 3 Type of member 'cwActual' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 6 12 myApp
                Warning 4 Type of member 'cwBuf' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 7 12 myApp
                Warning 5 Type of member 'cmdf' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 14 12 myApp
                Warning 6 Type of parameter 'cCmds' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\Ol eCommandTarget. vb 27 56 myApp
                Warning 7 Access of shared member, constant member, enum member or
                nested
                type through an instance; qualifying expression will not be
                evaluated.
                D:\data\IeI\gp\ AppCom\myApp\Op enDialog.vb 162 27 myApp
                Warning 8 Type of parameter 'E' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 15 67 myApp
                Warning 9 Type of parameter 'e' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 20 65 myApp
                Warning 10 Type of parameter 'e' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 21 73 myApp
                >
                >
                Warning 11 Type of parameter 'e' is not CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 22 74 myApp
                Public Event TopLevelNavigat eComplete2(ByVa l sender As Object,
                ByVal
                e
                As AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event)
                >
                Warning 12 Return type of function 'HtmlDocument' is not
                CLS-compliant.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 131 30 myApp
                Public ReadOnly Property HtmlDocument() As mshtml.HTMLDocu ment
                the below are used in webBrowser's OLE execute command like
                Dim cmdt As IOleCommandTarg et
                Dim o As Object
                >
                ' If the doc object isn't set to anything, or there's
                ' some bizarre error in accessing IOleCommandTarg et,
                ' exit gracefully.
                Try
                cmdt = CType(doc, IOleCommandTarg et)
                cmdt.Exec(cmdGU ID, MiscCommandTarg et.ViewSource,
                SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DODEFAULT , o, o)
                Catch
                Throw (New Exception(Err.G etException().M essage))
                End Try
                >
                Warning 14 Variable 'o' is passed by reference before it has been
                assigned a
                value. A null reference exception could result at runtime.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 247 109 myApp
                Warning 15 Variable 'o' is passed by reference before it has been
                assigned a
                value. A null reference exception could result at runtime.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 262 103 myApp
                Warning 16 Variable 'o' is passed by reference before it has been
                assigned a
                value. A null reference exception could result at runtime.
                D:\data\IeI\gp\ AppCom\myApp\We bOCHostCtrl.vb 277 106 myApp
                >
                >
                >
                >
                "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
                news:1158119369 .461775.225990@ e3g2000cwe.goog legroups.com...
                What kind of warnings are you getting? It might be a good idea to
                address them, as warnings tend to turn into runtime errors.

                Thanks,

                Seth Rowe

                GS wrote:
                in VS .net vb 2005 express,
                I failed to find the option for leaving out warning in the
                Errors
                tab
                but
                still leave Warning in the warning tab listing.
                >
                Can someone give me some hints? thank you for your time and
                advice

                Comment

                Working...