{"id":313,"date":"2010-07-07T14:41:24","date_gmt":"2010-07-07T14:41:24","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=313"},"modified":"2022-02-17T06:24:05","modified_gmt":"2022-02-17T06:24:05","slug":"events-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/events\/events-general","title":{"rendered":"Events General"},"content":{"rendered":"<p>Events allow a class user to define their own function to be called when an event happens.  <\/p>\n<h4>How To Create<\/h4>\n<h5>In the public area of the class definitions:<\/h5>\n<pre><code>\tevent EventHandler^ TickEvent;<\/code><\/pre>\n<h5>In the function of the class that you want to call the users function:<\/h5>\n<pre><code>\tTickEvent(this, gcnew EventArgs());<\/code><\/pre>\n<h5>In the users code:<\/h5>\n<pre><code>\r\n\tdmxSendTimer->TickEvent += gcnew EventHandler(this, &form_main::MyTimerTickEvent);\r\n\t\r\n\tprivate: System::Void MyTimerTickEvent(System::Object^ sender, EventArgs^  e) {\r\n\t\t...\r\n\t}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Events allow a class user to define their own function to be called when an event happens. How To Create In the public area of the class definitions: event EventHandler^ TickEvent; In the function of the class that you want to call the users function: TickEvent(this, gcnew EventArgs()); In the users code: dmxSendTimer->TickEvent += gcnew [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-events"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":1103,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/313\/revisions\/1103"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}