{"id":3850,"date":"2014-03-30T06:01:54","date_gmt":"2014-03-30T06:01:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-this-the-best-way-for-me-to-set-events-for-my-controls-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:01:54","modified_gmt":"2014-03-30T06:01:54","slug":"is-this-the-best-way-for-me-to-set-events-for-my-controls-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-this-the-best-way-for-me-to-set-events-for-my-controls-collection-of-common-programming-errors\/","title":{"rendered":"Is this the best way for me to set events for my controls?-Collection of common programming errors"},"content":{"rendered":"<p>There is no problem with this, and it won&#8217;t bog down your application&#8230;<\/p>\n<p>Except&#8230;<\/p>\n<p>If you call this function more than one time, for a single instance of your class, you could cause problems. Each time you call <code>SetPictureBoxEvents()<\/code>, you&#8217;ll get a <strong>new<\/strong> set of delegates attached to your event handler. If you call this four times, and don&#8217;t unsubscribe, your routines will run 4 times each when an event is raised.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is no problem with this, and it won&#8217;t bog down your application&#8230; Except&#8230; If you call this function more than one time, for a single instance of your class, you could cause problems. Each time you call SetPictureBoxEvents(), you&#8217;ll get a new set of delegates attached to your event handler. If you call this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3850","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3850"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3850\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}