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

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Exception has been thrown by the target of an invocation

Exception has been thrown by the target of an invocation

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

    The following line of code: this.lblImportFile.Font = new System.Drawing.Font("Tahoma", 8.25F); is throwing the following exception: {"Exception has been thrown by the target of an invocation." } and I have no idea why. does anybody have any ideas?

    D 1 Reply Last reply
    0
    • D Darkness84

      The following line of code: this.lblImportFile.Font = new System.Drawing.Font("Tahoma", 8.25F); is throwing the following exception: {"Exception has been thrown by the target of an invocation." } and I have no idea why. does anybody have any ideas?

      D Offline
      D Offline
      Darkness84
      wrote on last edited by
      #2

      Sorry forgot to mention I am using Visual Studio 2003 with .NET Framework 1.1

      D A 2 Replies Last reply
      0
      • D Darkness84

        Sorry forgot to mention I am using Visual Studio 2003 with .NET Framework 1.1

        D Offline
        D Offline
        Darkness84
        wrote on last edited by
        #3

        I have narrowed it down to an "Overflow or underflow in the arithmetic operation." but I still don't know why.

        1 Reply Last reply
        0
        • D Darkness84

          Sorry forgot to mention I am using Visual Studio 2003 with .NET Framework 1.1

          A Offline
          A Offline
          Amjath Rahman
          wrote on last edited by
          #4

          then u can see the inner exception, then u came to know whats the problem. Ex.InnerException.Message With regards Amjath

          A 1 Reply Last reply
          0
          • A Amjath Rahman

            then u can see the inner exception, then u came to know whats the problem. Ex.InnerException.Message With regards Amjath

            A Offline
            A Offline
            Amjath Rahman
            wrote on last edited by
            #5

            this is working fine this.lblTest.Font = new System.Drawing.Font("Tahoma", 18.25F); am using c# 2005 expression edition With regards Amjath

            L 1 Reply Last reply
            0
            • A Amjath Rahman

              this is working fine this.lblTest.Font = new System.Drawing.Font("Tahoma", 18.25F); am using c# 2005 expression edition With regards Amjath

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              if you can catch the exception, show it with ToString() method. DO NOT USE MESSAGE PROPERTY ToString() shows everything there is, Message only gives a short one-line summmary. :)

              Luc Pattyn


              try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


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


              • Login

              • Don't have an account? Register

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