{"id":404,"date":"2011-12-28T13:02:33","date_gmt":"2011-12-28T13:02:33","guid":{"rendered":"http:\/\/devnot.wordpress.com\/?p=404"},"modified":"2011-12-28T13:02:33","modified_gmt":"2011-12-28T13:02:33","slug":"reduce-flickering-by-disabling-onpaintbackground","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=404","title":{"rendered":"Reduce flickering by disabling OnPaintBackground"},"content":{"rendered":"<p>When an entire control is painted (e.g. hosting a windowed directx control) it can be beneficial to override <em>OnPaintBackground<\/em><\/p>\n<p>In case of a windowed directx control double buffering is not possible, in other cases it may not be desirable. <\/p>\n<p>When the background is not shown because it&#8217;s overlapped entirely, not drawing it all will speedup things and reduce flicker.<\/p>\n<p>Add the following to the control to override.<\/p>\n<p>protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e)<br \/>\n{<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When an entire control is painted (e.g. hosting a windowed directx control) it can be beneficial to override OnPaintBackground In case of a windowed directx control double buffering is not possible, in other cases it may not be desirable. When the background is not shown because it&#8217;s overlapped entirely, not drawing it all will speedup [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[25],"class_list":["post-404","post","type-post","status-publish","format-standard","hentry","category-c","tag-double-buffering"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=404"}],"version-history":[{"count":0,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/404\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}