<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Toolbar Enable/Disable via .net? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040652#M38172</link>
    <description>&lt;P&gt;Hi Alexander,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;True - that's certainly an option, depending on your needs. I personally like this approach, but the basic technique could certainly be adapted to do what you've suggested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kean&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2016 09:01:29 GMT</pubDate>
    <dc:creator>kean_walmsley</dc:creator>
    <dc:date>2016-02-16T09:01:29Z</dc:date>
    <item>
      <title>Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/5878365#M38166</link>
      <description>&lt;P&gt;When AutoCAD is loading (using Autocad 2015), I see that my toolbars are disabled (grayed-out) until the loading has finished. &amp;nbsp;Our company does some additional data loading after AutoCAD has become idle. &amp;nbsp;But if the user clicks certain custom toolbar buttons while our additional data is loading, AutoCAD fatal errors. &amp;nbsp;Is there a way we can disable the toolbars (like AutoCAD does) until our loading is finished, and then enable them? &amp;nbsp;I haven't been able to locate an API that provides this capability. &amp;nbsp;Any suggestions greatly appreciated!&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Pete Elliott&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2015 16:41:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/5878365#M38166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-26T16:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6039623#M38167</link>
      <description>&lt;P&gt;Hi Pete,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this post help? I assumed you meant the ribbon, rather than toolbars, but let me know if that's not the case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2016/02/disabling-the-autocad-ribbon-using-net.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2016/02/disabling-the-autocad-ribbon-using-net.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kean&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 15:29:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6039623#M38167</guid>
      <dc:creator>kean_walmsley</dc:creator>
      <dc:date>2016-02-15T15:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6039857#M38168</link>
      <description>&lt;P&gt;Yes, that helps a great deal and we will use it! &amp;nbsp;But I did mean the toolbars. &amp;nbsp;We have both available via our Enterprise menu plus through code. Thanks for your efforts, they are very much appreciated.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Pete Elliott&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 17:23:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6039857#M38168</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-15T17:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040258#M38169</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;elliottpd11 написано:&lt;BR /&gt;
&lt;P&gt;Yes, that helps a great deal and we will use it! &amp;nbsp;But I did mean the toolbars. &amp;nbsp;We have both available via our Enterprise menu plus through code. Thanks for your efforts, they are very much appreciated.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Pete Elliott&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If I understand you correctly, you can use ActiveX/COM API to do your's toolbar visible/invisible&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 22:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040258#M38169</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-02-15T22:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040640#M38170</link>
      <description>&lt;P&gt;Glad if it was of some use, at least. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a follow-up attempt, which should cover both the ribbon and any visible toolbars:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2016/02/disabling-autocads-toolbars-using-net.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2016/02/disabling-autocads-toolbars-using-net.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kean&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 08:42:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040640#M38170</guid>
      <dc:creator>kean_walmsley</dc:creator>
      <dc:date>2016-02-16T08:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040642#M38171</link>
      <description>&lt;P&gt;Hi, Kean!&lt;/P&gt;
&lt;P&gt;It seems to me that there is no need to turn off &lt;STRONG&gt;all&lt;/STRONG&gt; the visible toolbars. Maybe just enough to turn off &lt;STRONG&gt;own&lt;/STRONG&gt; toolbars (e.g. create list of their names and off/on with this list)&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 08:53:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040642#M38171</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-02-16T08:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040652#M38172</link>
      <description>&lt;P&gt;Hi Alexander,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;True - that's certainly an option, depending on your needs. I personally like this approach, but the basic technique could certainly be adapted to do what you've suggested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kean&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 09:01:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6040652#M38172</guid>
      <dc:creator>kean_walmsley</dc:creator>
      <dc:date>2016-02-16T09:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6042264#M38173</link>
      <description>&lt;P&gt;With help of ObjectARX and Win32/MFC it possible to temporary disable all UI elements:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;static void DisableUI () 
{
    CMDIFrameWnd *frame = acedGetAcadFrame();
    // Disable AutoCAD Frame, Ribbon, Toolbars, etc.
    frame-&amp;gt;EnableWindow(FALSE);
    // Invoke progressbar
    acedSetStatusBarProgressMeter(_T("Loading My Critical Data"), 0, 10);
    for (int i = 0; i &amp;lt; 10; i++)
    {
     Sleep(1000); // Only for testing 
     acedSetStatusBarProgressMeterPos(i);
    }
    acedRestoreStatusBar();
    // Enable AutoCAD Frame, Ribbon, Toolbars, etc.
    frame-&amp;gt;EnableWindow(TRUE);
}
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other possibility is using BlockInput function:&lt;/P&gt;
&lt;PRE&gt;[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern bool BlockInput([In, MarshalAs(UnmanagedType.Bool)] bool fBlockIt);&lt;/PRE&gt;
&lt;P&gt;To block keyboard and mouse input:&lt;/P&gt;
&lt;PRE&gt;BlockInput(true);&lt;/PRE&gt;
&lt;P&gt;To unblock keyboard and mouse input:&lt;/P&gt;
&lt;PRE&gt;BlockInput(false);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 23:00:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6042264#M38173</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-02-16T23:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbar Enable/Disable via .net?</title>
      <link>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6042846#M38174</link>
      <description>&lt;P&gt;Excellent suggestion, Alexander!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I took the first MFC snippet and used the same approach using P/Invoke from C#:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2016/02/disabling-autocads-complete-ui-using-net.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2016/02/disabling-autocads-complete-ui-using-net.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kean&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 07:49:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/toolbar-enable-disable-via-net/m-p/6042846#M38174</guid>
      <dc:creator>kean_walmsley</dc:creator>
      <dc:date>2016-02-17T07:49:45Z</dc:date>
    </item>
  </channel>
</rss>

