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. using Marquette in custom control

using Marquette in custom control

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.
  • S Offline
    S Offline
    Sasuko
    wrote on last edited by
    #1

    I've created a custom control that uses ControlStyle.BackBuffer ControlStyle.User etc... And i show a marquette when i move the mouse. the problem is if i use ControlStyle flags the control doesn't flicker but the it is impossible to see the marquette, if i doesn't use ControlStyle flags the marquette is showed correctly an it follow the mouse but the control flicks. Whow can i avoid the flickering drawing also the marquette?

    R 1 Reply Last reply
    0
    • S Sasuko

      I've created a custom control that uses ControlStyle.BackBuffer ControlStyle.User etc... And i show a marquette when i move the mouse. the problem is if i use ControlStyle flags the control doesn't flicker but the it is impossible to see the marquette, if i doesn't use ControlStyle flags the marquette is showed correctly an it follow the mouse but the control flicks. Whow can i avoid the flickering drawing also the marquette?

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      I assume you are using CreateGraphics to obtain a Grpahics object to draw your marquette to. You should in this case instead fill some field with the info on where to draw the marquette and call Invalidate to initiate a complete redraw of the control. Than in OnPaint you can also draw the marquette. If this is too slow because the painting function is very complex you will have to paint into a bitmap first and then draw this onto the control. While only the marquette is changing you could always just draw the bitmap + marquette.

      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