Object type cannot be converted to target type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news.microsoft.com

    #1

    Object type cannot be converted to target type

    I got this error "Object type cannot be converted to target type" in my VB
    Winforms application. When I click on it, it goes no where, how do I
    troubleshoot this? Thank you.


  • Bob Powell [MVP]

    #2
    Re: Object type cannot be converted to target type

    You'll have to post some code.

    --
    Bob Powell [MVP]
    Visual C#, System.Drawing

    Find great Windows Forms articles in Windows Forms Tips and Tricks


    Answer those GDI+ questions with the GDI+ FAQ


    All new articles provide code in C# and VB.NET.
    Subscribe to the RSS feeds provided and never miss a new article.





    "news.microsoft .com" <Astroboy@hotma il.com> wrote in message
    news:e09mreocFH A.580@TK2MSFTNG P15.phx.gbl...[color=blue]
    >I got this error "Object type cannot be converted to target type" in my VB
    >Winforms application. When I click on it, it goes no where, how do I
    >troubleshoot this? Thank you.
    >[/color]


    Comment

    • news.microsoft.com

      #3
      Re: Object type cannot be converted to target type

      I don't know where the problem is since it does not point there, instead it
      point to the 1st line of the .vb file, the file is 2k long which I don't
      think anyone want to read it.

      "Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
      news:%23UE2KEpc FHA.2760@tk2msf tngp13.phx.gbl. ..[color=blue]
      > You'll have to post some code.
      >
      > --
      > Bob Powell [MVP]
      > Visual C#, System.Drawing
      >
      > Find great Windows Forms articles in Windows Forms Tips and Tricks
      > http://www.bobpowell.net/tipstricks.htm
      >
      > Answer those GDI+ questions with the GDI+ FAQ
      > http://www.bobpowell.net/faqmain.htm
      >
      > All new articles provide code in C# and VB.NET.
      > Subscribe to the RSS feeds provided and never miss a new article.
      >
      >
      >
      >
      >
      > "news.microsoft .com" <Astroboy@hotma il.com> wrote in message
      > news:e09mreocFH A.580@TK2MSFTNG P15.phx.gbl...[color=green]
      >>I got this error "Object type cannot be converted to target type" in my VB
      >>Winforms application. When I click on it, it goes no where, how do I
      >>troubleshoo t this? Thank you.
      >>[/color]
      >
      >[/color]


      Comment

      • alantolan@users.com

        #4
        Re: Object type cannot be converted to target type

        try changing the exception handling behviour to see if you can localize
        the problem

        CTRL+ALT+E to show the exceptions screen

        select the, 'Common Language Runtime Exceptions'

        Change the, 'When the exception is thrown' setting to, 'Break into the
        debugger'

        This should bring you to where it is occurring. Hopefully.

        If you are getting lots of exceptions (this will break even on handled
        exceptions) then try to change the setting just before you invoke the
        functionality that causes the error.

        Alan.

        Comment

        Working...