{"id":83,"date":"2014-07-21T10:58:54","date_gmt":"2014-07-21T14:58:54","guid":{"rendered":"http:\/\/salzlechner.com\/dev\/?p=83"},"modified":"2016-03-11T07:16:02","modified_gmt":"2016-03-11T12:16:02","slug":"stop-panel-from-automatically-activating","status":"publish","type":"post","link":"http:\/\/salzlechner.com\/dev\/2014\/07\/21\/stop-panel-from-automatically-activating\/","title":{"rendered":"Stop Panel from automatically activating"},"content":{"rendered":"<p>Most times we want our main panel to automatically activate but sometimes we need to be able to control the activation.<\/p>\n<p>For example we have programs that depending on a command line parameter either run automated or manual. If we run them automated we do not want to see the panel on the screen of course.<\/p>\n<p>First in the panel we disable auto activation<\/p>\n<pre class=\"lang:default decode:true\">Object oMain is a Panel\r\n    Set Label to \"Import ORU\"\r\n    Set Location to 4 3\r\n    Set Size to 300 450\r\n    Set Auto_Activate_State to False<\/pre>\n<p>then we add the following code at the bottom after the panel<\/p>\n<pre class=\"lang:default decode:true\" abp=\"2691\">Procedure ProcessCMDLine\r\n    String sCMD\r\n    CMDLINE sCMD\r\n    If (Trim(Uppercase(sCMD))=\"\/AUTO\") Begin\r\n        Send DoAutoProcess to ...\r\n\r\n        Abort\r\n    End    \r\n    Else Send Activate to oMain\r\nEnd_Procedure\r\n\r\nSend ProcessCMDLine<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>By default the main panel in a DataFlex desktop application automatically activates. Sometimes this is not needed. Here is how to prevent this<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-dataflex"],"_links":{"self":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":3,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":293,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/83\/revisions\/293"}],"wp:attachment":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}