CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Posts
    122

    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 ?

  2. #2
    Join Date
    Jun 2010
    Posts
    85

    Re: can I make zooming in the form itself ?

    Am I understanding you correctly...

    Are you extending a picture box and then setting the picturebox.Image = to the image that you drew?

    If so why would you do that? Inherit from Control, override the Paint method and draw to a bitmap first then draw to the screen. Also override OnEraseBackGround and DO NOT call base.OnEraseBackGround.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured