<?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 TabbedDialogExtension in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333397#M85000</link>
    <description>Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm using AutoCAD 2006, VS 2003 and writing a C# tab add-in for the options &lt;BR /&gt;
dialog.&lt;BR /&gt;
&lt;BR /&gt;
I've added a user control to my project, then added a groupbox which &lt;BR /&gt;
contains several controls, including a button.&lt;BR /&gt;
&lt;BR /&gt;
The button event is supposed to fire up a FolderBroswerDialog, however, &lt;BR /&gt;
whenever I hit the button, AutoCAD hangs&lt;BR /&gt;
as if it's lost focus. I then knocked this out and just tried spitting up a &lt;BR /&gt;
MessageBox - no go either.&lt;BR /&gt;
&lt;BR /&gt;
Interestingly enough, if I have a buton by itself (not contained in the &lt;BR /&gt;
groupbox) on the user control, I can get it to successfully work.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have any ideas as to what is causing this behaviour?&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.</description>
    <pubDate>Mon, 23 May 2005 08:55:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-05-23T08:55:11Z</dc:date>
    <item>
      <title>TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333397#M85000</link>
      <description>Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm using AutoCAD 2006, VS 2003 and writing a C# tab add-in for the options &lt;BR /&gt;
dialog.&lt;BR /&gt;
&lt;BR /&gt;
I've added a user control to my project, then added a groupbox which &lt;BR /&gt;
contains several controls, including a button.&lt;BR /&gt;
&lt;BR /&gt;
The button event is supposed to fire up a FolderBroswerDialog, however, &lt;BR /&gt;
whenever I hit the button, AutoCAD hangs&lt;BR /&gt;
as if it's lost focus. I then knocked this out and just tried spitting up a &lt;BR /&gt;
MessageBox - no go either.&lt;BR /&gt;
&lt;BR /&gt;
Interestingly enough, if I have a buton by itself (not contained in the &lt;BR /&gt;
groupbox) on the user control, I can get it to successfully work.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have any ideas as to what is causing this behaviour?&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.</description>
      <pubDate>Mon, 23 May 2005 08:55:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333397#M85000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-23T08:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333398#M85001</link>
      <description>If you have the 2.0 framework installed, restrict AutoCAD to use v1.1.4322.&lt;BR /&gt;
That was the cause/solution in my case.&lt;BR /&gt;
&lt;BR /&gt;
-- Mike&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
___________________________&lt;BR /&gt;
the trick is to realize that there is no spoon...</description>
      <pubDate>Mon, 23 May 2005 13:55:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333398#M85001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-23T13:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333399#M85002</link>
      <description>Mike,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the reply. I did have 2.0 on the system as part of the C# 2005 &lt;BR /&gt;
Express install,&lt;BR /&gt;
however I removed that a few weeks ago.&lt;BR /&gt;
&lt;BR /&gt;
Do you still think it could be making the difference?&lt;BR /&gt;
&lt;BR /&gt;
As far as restricting Acad to 1.1 are you talking about the acad.exe.config &lt;BR /&gt;
file? If so, what should it look like?&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.&lt;BR /&gt;
&lt;BR /&gt;
"Mike Tuersley" &lt;MTUERSLEY_NOT_&gt; wrote in message &lt;BR /&gt;
news:4853342@discussion.autodesk.com...&lt;BR /&gt;
If you have the 2.0 framework installed, restrict AutoCAD to use v1.1.4322.&lt;BR /&gt;
That was the cause/solution in my case.&lt;BR /&gt;
&lt;BR /&gt;
-- Mike&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
___________________________&lt;BR /&gt;
the trick is to realize that there is no spoon...&lt;/MTUERSLEY_NOT_&gt;</description>
      <pubDate>Tue, 24 May 2005 06:41:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333399#M85002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T06:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333400#M85003</link>
      <description>Well, I sent the dll to a friend and asked him to load it in his 2006 and &lt;BR /&gt;
still no go. He doesn't have .NET 2.0 loaded.&lt;BR /&gt;
I'm at a loss at this point, unless somebody can give me another direction &lt;BR /&gt;
to try&lt;BR /&gt;
or if anybody has some sample code like this to post...&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.</description>
      <pubDate>Tue, 24 May 2005 10:38:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333400#M85003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T10:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333401#M85004</link>
      <description>Mike,&lt;BR /&gt;
&lt;BR /&gt;
Do you have any sample code for implementing a tabbed extension using C#?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
Tim Strandberg&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Mike Tuersley" &lt;MTUERSLEY_NOT_&gt; wrote in message&lt;BR /&gt;
news:4853342@discussion.autodesk.com...&lt;BR /&gt;
If you have the 2.0 framework installed, restrict AutoCAD to use v1.1.4322.&lt;BR /&gt;
That was the cause/solution in my case.&lt;BR /&gt;
&lt;BR /&gt;
-- Mike&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
___________________________&lt;BR /&gt;
the trick is to realize that there is no spoon...&lt;/MTUERSLEY_NOT_&gt;</description>
      <pubDate>Tue, 24 May 2005 13:19:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333401#M85004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T13:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333402#M85005</link>
      <description>&amp;gt; Do you have any sample code for implementing a tabbed extension using C#?&lt;BR /&gt;
No, not at the moment. Here is one in VB.NET though that will get you&lt;BR /&gt;
going. It's done in VS2003 and you can only add a tab to 2006+&lt;BR /&gt;
&lt;BR /&gt;
-- Mike&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
___________________________&lt;BR /&gt;
the trick is to realize that there is no spoon...</description>
      <pubDate>Tue, 24 May 2005 15:13:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333402#M85005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T15:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333403#M85006</link>
      <description>Don't forget to add the mgd references!&lt;BR /&gt;
&lt;BR /&gt;
-- Mike&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
___________________________&lt;BR /&gt;
the trick is to realize that there is no spoon...</description>
      <pubDate>Tue, 24 May 2005 15:26:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333403#M85006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T15:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333404#M85007</link>
      <description>This is a bug in AutoCAD (acmgd.dll). There's a relatively easy workaround. &lt;BR /&gt;
Add the following code to your user control:&lt;BR /&gt;
&lt;BR /&gt;
       const int GWL_EXSTYLE         = -20;&lt;BR /&gt;
        const int WS_EX_CONTROLPARENT = 0x00010000;&lt;BR /&gt;
        [DllImport("user32.dll")]&lt;BR /&gt;
        private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int &lt;BR /&gt;
dwNewLong);&lt;BR /&gt;
&lt;BR /&gt;
        [DllImport("user32.dll")]&lt;BR /&gt;
        private static extern int GetWindowLong(IntPtr hWnd, int nIndex);&lt;BR /&gt;
        [DllImport("user32.dll")]&lt;BR /&gt;
        private static extern IntPtr GetParent(IntPtr hWnd);&lt;BR /&gt;
        protected override void OnLoad(EventArgs e)&lt;BR /&gt;
        {&lt;BR /&gt;
            //workaround bug in AutoCAD: the WS_EX_CONTROLPARENT style is &lt;BR /&gt;
not set on the tab hosting&lt;BR /&gt;
            //our user control (the parent of the our control). This &lt;BR /&gt;
confuses user32.dll into hanging in&lt;BR /&gt;
            //an infinite loop. Manually set the style to correct this.&lt;BR /&gt;
            IntPtr hwndParent = GetParent(this.Handle);&lt;BR /&gt;
            SetWindowLong(hwndParent,GWL_EXSTYLE,GetWindowLong(hwndParent,GWL_EXSTYLE) &lt;BR /&gt;
| WS_EX_CONTROLPARENT);&lt;BR /&gt;
            base.OnLoad (e);&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;BR /&gt;
"Glenn Ryan" &lt;INFO&gt; wrote in message &lt;BR /&gt;
news:4853128@discussion.autodesk.com...&lt;BR /&gt;
Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm using AutoCAD 2006, VS 2003 and writing a C# tab add-in for the options&lt;BR /&gt;
dialog.&lt;BR /&gt;
&lt;BR /&gt;
I've added a user control to my project, then added a groupbox which&lt;BR /&gt;
contains several controls, including a button.&lt;BR /&gt;
&lt;BR /&gt;
The button event is supposed to fire up a FolderBroswerDialog, however,&lt;BR /&gt;
whenever I hit the button, AutoCAD hangs&lt;BR /&gt;
as if it's lost focus. I then knocked this out and just tried spitting up a&lt;BR /&gt;
MessageBox - no go either.&lt;BR /&gt;
&lt;BR /&gt;
Interestingly enough, if I have a buton by itself (not contained in the&lt;BR /&gt;
groupbox) on the user control, I can get it to successfully work.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have any ideas as to what is causing this behaviour?&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.&lt;/INFO&gt;</description>
      <pubDate>Tue, 24 May 2005 17:39:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333404#M85007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T17:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: TabbedDialogExtension</title>
      <link>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333405#M85008</link>
      <description>Albert,&lt;BR /&gt;
&lt;BR /&gt;
That workaround functioned perfectly. I thought I was going mad there for a &lt;BR /&gt;
while.&lt;BR /&gt;
&lt;BR /&gt;
I had FlatStyle set to System for the controls, to pick up XP visuals and &lt;BR /&gt;
this didn't work at all.&lt;BR /&gt;
&lt;BR /&gt;
I then set FlatStyle back to Standard and this seemed to allow the "browse" &lt;BR /&gt;
button to spit up the Pick-A-Folder dialog.&lt;BR /&gt;
I then hit a checkbox control in the groupbox and this toggles the enabled &lt;BR /&gt;
state of all the controls in the groupbox.&lt;BR /&gt;
&lt;BR /&gt;
So now the controls were disabled, hit checkbox again to enable the controls &lt;BR /&gt;
and it would hang again.&lt;BR /&gt;
&lt;BR /&gt;
Your workaround has fixed all this and I can set FlatStyle to System to get &lt;BR /&gt;
the visuals. Nicely done.&lt;BR /&gt;
&lt;BR /&gt;
Thanks very much.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.&lt;BR /&gt;
&lt;BR /&gt;
"Albert Szilvasy" &lt;NOT_PROVIDED&gt; wrote in message &lt;BR /&gt;
news:4854858@discussion.autodesk.com...&lt;BR /&gt;
This is a bug in AutoCAD (acmgd.dll). There's a relatively easy workaround.&lt;BR /&gt;
Add the following code to your user control:&lt;BR /&gt;
&lt;BR /&gt;
       const int GWL_EXSTYLE         = -20;&lt;BR /&gt;
        const int WS_EX_CONTROLPARENT = 0x00010000;&lt;BR /&gt;
        [DllImport("user32.dll")]&lt;BR /&gt;
        private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int&lt;BR /&gt;
dwNewLong);&lt;BR /&gt;
&lt;BR /&gt;
        [DllImport("user32.dll")]&lt;BR /&gt;
        private static extern int GetWindowLong(IntPtr hWnd, int nIndex);&lt;BR /&gt;
        [DllImport("user32.dll")]&lt;BR /&gt;
        private static extern IntPtr GetParent(IntPtr hWnd);&lt;BR /&gt;
        protected override void OnLoad(EventArgs e)&lt;BR /&gt;
        {&lt;BR /&gt;
            //workaround bug in AutoCAD: the WS_EX_CONTROLPARENT style is&lt;BR /&gt;
not set on the tab hosting&lt;BR /&gt;
            //our user control (the parent of the our control). This&lt;BR /&gt;
confuses user32.dll into hanging in&lt;BR /&gt;
            //an infinite loop. Manually set the style to correct this.&lt;BR /&gt;
            IntPtr hwndParent = GetParent(this.Handle);&lt;BR /&gt;
            SetWindowLong(hwndParent,GWL_EXSTYLE,GetWindowLong(hwndParent,GWL_EXSTYLE)&lt;BR /&gt;
| WS_EX_CONTROLPARENT);&lt;BR /&gt;
            base.OnLoad (e);&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
Albert&lt;BR /&gt;
&lt;BR /&gt;
"Glenn Ryan" &lt;INFO&gt; wrote in message&lt;BR /&gt;
news:4853128@discussion.autodesk.com...&lt;BR /&gt;
Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
I'm using AutoCAD 2006, VS 2003 and writing a C# tab add-in for the options&lt;BR /&gt;
dialog.&lt;BR /&gt;
&lt;BR /&gt;
I've added a user control to my project, then added a groupbox which&lt;BR /&gt;
contains several controls, including a button.&lt;BR /&gt;
&lt;BR /&gt;
The button event is supposed to fire up a FolderBroswerDialog, however,&lt;BR /&gt;
whenever I hit the button, AutoCAD hangs&lt;BR /&gt;
as if it's lost focus. I then knocked this out and just tried spitting up a&lt;BR /&gt;
MessageBox - no go either.&lt;BR /&gt;
&lt;BR /&gt;
Interestingly enough, if I have a buton by itself (not contained in the&lt;BR /&gt;
groupbox) on the user control, I can get it to successfully work.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have any ideas as to what is causing this behaviour?&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Glenn.&lt;/INFO&gt;&lt;/NOT_PROVIDED&gt;</description>
      <pubDate>Tue, 24 May 2005 23:34:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/tabbeddialogextension/m-p/1333405#M85008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-05-24T23:34:24Z</dc:date>
    </item>
  </channel>
</rss>

