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

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. GetTextExtent?

GetTextExtent?

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

    I've just started doing a bit of stuff with text and I can't seem to find anologs for GetTextExtentPoint32() and the like in the Graphics or Font classes. Any hints where that stuff is? For example, I want to find the size of a string in a given font. Matt Gerrans

    G 1 Reply Last reply
    0
    • M Matt Gerrans

      I've just started doing a bit of stuff with text and I can't seem to find anologs for GetTextExtentPoint32() and the like in the Graphics or Font classes. Any hints where that stuff is? For example, I want to find the size of a string in a given font. Matt Gerrans

      G Offline
      G Offline
      Gary Thom
      wrote on last edited by
      #2

      MeasureCharacterRanges[^] There is also a function MeasureString() which is a member of the Graphics class, it is overloaded to perform a number of different measurement types. Hope that helps. Gary "A fellow with the inventiveness of Albert Einstein but with the attention span of Daffy Duck." Tom Shales talking about Robin Williams

      M 1 Reply Last reply
      0
      • G Gary Thom

        MeasureCharacterRanges[^] There is also a function MeasureString() which is a member of the Graphics class, it is overloaded to perform a number of different measurement types. Hope that helps. Gary "A fellow with the inventiveness of Albert Einstein but with the attention span of Daffy Duck." Tom Shales talking about Robin Williams

        M Offline
        M Offline
        Matt Gerrans
        wrote on last edited by
        #3

        Yes, that looks like just the thing. Thanks! Matt Gerrans

        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