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. graphics height of form [modified]

graphics height of form [modified]

Scheduled Pinned Locked Moved C#
graphicshelpquestion
2 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.
  • T Offline
    T Offline
    thepersonof
    wrote on last edited by
    #1

    hey I currently paint my form with the code: protected override void OnPaint(PaintEventArgs e) { paintflag = !paintflag; Graphics dc = e.Graphics; drawableWidth = dc.ClipBounds.Width; drawableHeight = dc.ClipBounds.Height; ... paint here the problem is that when only part of the form needs to be redrawn the height is wrong and it all messes up. Is there any value I can get that specifies this inner height? I've tried this.clientsize.height but the value obtained is too large. What can I do? thank you dave -- modified at 13:01 Tuesday 1st August, 2006

    S 1 Reply Last reply
    0
    • T thepersonof

      hey I currently paint my form with the code: protected override void OnPaint(PaintEventArgs e) { paintflag = !paintflag; Graphics dc = e.Graphics; drawableWidth = dc.ClipBounds.Width; drawableHeight = dc.ClipBounds.Height; ... paint here the problem is that when only part of the form needs to be redrawn the height is wrong and it all messes up. Is there any value I can get that specifies this inner height? I've tried this.clientsize.height but the value obtained is too large. What can I do? thank you dave -- modified at 13:01 Tuesday 1st August, 2006

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      I've never done custom drawing but I think maybe PaintEventArgs.ClipRectangle contains the information you're looking for.?


      "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

      www.troschuetz.de

      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