Results 1 to 26 of 26

Thread: [RESOLVED] GDI functions are slowing down Winsock

Threaded View

  1. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: GDI functions are slowing down Winsock

    How much of the window are you invalidating? By creating a bounding rect as small as possible that encompasses just the area that needs to be redrawn will speed things up.

    Faster than invalidaterect?
    The issue isn't the API, it is either you are "refreshing" more picturebox than needed, or "refreshing" too often. The question you may need to ask yourself is, "does the graph have to be updated real time?" If the answer is no, then update the graph on a timer. Use a "dirty" flag to indicate the data changed, so the timer event doesn't update the graph if there isn't anything to update (again wasting cpu cycles).

    The above is just one idea. Sounds like your graph may be quite large? Please respond to opus' question also.

    Edited: also look at your drawing routine; optimize it to death. Example: if the graph scrolls, don't erase & redraw all the points over and over again, slide what doesn't change by using BitBlt.
    Last edited by LaVolpe; Apr 15th, 2010 at 08:51 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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