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. can I make zooming in the form itself ?

can I make zooming in the form itself ?

Scheduled Pinned Locked Moved C#
questionhelp
3 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.
  • H Offline
    H Offline
    Honeyboy_20
    wrote on last edited by
    #1

    can I make zooming in the form itself ? hi, I have the following problem , I am reading from serial port and draw plots from the serial port in the form and no problem with flicker (I am enable doublebuffersize property) after doing this i does n't have any problem but the problem come when i want to make zooming in the form so I am draw in panel or picturebox but the problem of flicker appear as long as i am extend picturebox as a control and add in the constructor the following method : Code: SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); so my question can I make zooming in the form itself if i can not what is the solution for flicker ?

    E G 2 Replies Last reply
    0
    • H Honeyboy_20

      can I make zooming in the form itself ? hi, I have the following problem , I am reading from serial port and draw plots from the serial port in the form and no problem with flicker (I am enable doublebuffersize property) after doing this i does n't have any problem but the problem come when i want to make zooming in the form so I am draw in panel or picturebox but the problem of flicker appear as long as i am extend picturebox as a control and add in the constructor the following method : Code: SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); so my question can I make zooming in the form itself if i can not what is the solution for flicker ?

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      Usually flickering occurs from trying to redraw the entire area. Make sure you only invalidate the regions that need to be invalidated instead of the entire control. That is the only way, in GDI+, to control flicker that I have found. If you need really fast drawing code (more than 15FPS) you need to use DirectX or OpenGL.

      Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      1 Reply Last reply
      0
      • H Honeyboy_20

        can I make zooming in the form itself ? hi, I have the following problem , I am reading from serial port and draw plots from the serial port in the form and no problem with flicker (I am enable doublebuffersize property) after doing this i does n't have any problem but the problem come when i want to make zooming in the form so I am draw in panel or picturebox but the problem of flicker appear as long as i am extend picturebox as a control and add in the constructor the following method : Code: SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); so my question can I make zooming in the form itself if i can not what is the solution for flicker ?

        G Offline
        G Offline
        Gonzalo Cao
        wrote on last edited by
        #3

        I guess this is quite obvious, but besides making sure that you only redraw the desired area and not the whole control, make sure that you are not reading from the serial port un the UI thread. Long processes can interfere with the drawing of the form.

        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