C#.NET and Dockable Cotainer

C#.NET and Dockable Cotainer

Anonymous
Not applicable
338 Views
5 Replies
Message 1 of 6

C#.NET and Dockable Cotainer

Anonymous
Not applicable
I'm wondering if there is a way to use
the AutoCAD Dockable Container with
a control made with Visual C#.NET

Anyone can tell me this?
0 Likes
339 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
On Mon, 15 Mar 2004 17:35:43 GMT, PrentaT wrote: > I'm wondering if there is a way to use > the AutoCAD Dockable Container with > a control made with Visual C#.NET > > Anyone can tell me this? I have yet to actually do it myself, but I don't see why you can't. Just look at the vb sample that came with the dockable container and adapt it. You can also look at this thread from the ng for info on connecting to it: http://tinyurl.com/2v3lh -- ___________________________ Mike Tuersley CADalyst's AutoCAD Clinic Rand IMAGINiT Technologies
0 Likes
Message 3 of 6

Anonymous
Not applicable
>I have yet to actually do it myself, but I don't see
>why you can't. Just look at the vb sample that
> came with the dockable container and adapt it.
> You can also look at this thread from the ng for
> info on connecting to it:

Thanks.

The VB sample doesn't work in VS.Net, even
in VB.NET. There is no ActiveX control wizard
for VB.NET or C#.NET.

So, once again, anyone know of any way to
make a C# control for use in dockable container?
0 Likes
Message 4 of 6

Anonymous
Not applicable
PrentaT wrote: > Anyone can tell me this? While a .NET UserControl looks a lot like an OCX, the fact is it's not. There is no direct counterpart. However, I have been able to use UserControls in Inventor's browser panes so perhaps the same can be done for ACCONT.ARX. -- There are 10 kinds of people. Those who understand binary and those who don't. http://code.acadx.com (Pull the pin to reply)
0 Likes
Message 5 of 6

Anonymous
Not applicable
Exposing the .NET UserControl class as an ActiveX control is possible, but is totally unsupported and unsanctioned by Microsoft (e.g., you're on your own). The attached VS.NET 2002 C# project contains a control that can be hosted by the Dockable Container (on 2004 only). This is a standard UserControl that is exposed as an ActiveX control. There are several issues that you need to know, regarding building and deploying: 1. You must sign the assembly housing the control with a strong name/key pair, and you must install it into the global assembly cache (when you deploy). 2. You must set the project property 'Register for COM interop' to true. If you deploy without an installer, you must register the assembly using regasm.exe with the /tlb option. You will see lots of warnings if you do, regarding CLR types that are not visible to COM, but but don't worry about them (as long as the container is not calling methods/properties that refer to those types, which AcCont doesn't, you should have no problem). 3. All refrerenced assemblies must also be signed with a strong name/key pair (if you reference interop.AutoCAD then you'll need to add a key file to the project that is used to sign referenced interop assemblies, see MSDN article 313666 for more info). The major problem with the Dockable container and .NET, is that everyone that distributes a project like the one attached, will have to include a strong named RCW assembly for AcCont16, but since it must be installed in the global assembly cache, others will also have to so this, since each sinced assembly is considered to be different (from a type compatiblity standpoint). The only solution to that is to have Jorge publish and distribute Primary COM Interop Assembly for AcCont that can be installed only if it is not already there. You might also note that this same problem applies to AutoCAD's RCW, which is a PIA in 2005, but I do not believe that's the case in 2004, so everyone that tries to distribute a signed interop RCW assembly for AutoCAD will end up stepping on each other. -- http://www.caddzone.com AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005 http://www.acadxtabs.com AcadX for AutoCAD 2004 Beta 1 http://mysite.verizon.net/~vze2vjds/acadx/AcadX16.zip "PrentaT" wrote in message news:19603119.1079447695702.JavaMail.jive@jiveforum1.autodesk.com... > >I have yet to actually do it myself, but I don't see > >why you can't. Just look at the vb sample that > > came with the dockable container and adapt it. > > You can also look at this thread from the ng for > > info on connecting to it: > > Thanks. > > The VB sample doesn't work in VS.Net, even > in VB.NET. There is no ActiveX control wizard > for VB.NET or C#.NET. > > So, once again, anyone know of any way to > make a C# control for use in dockable container?
0 Likes
Message 6 of 6

Anonymous
Not applicable
Thank you Tony! And here I was going to go to bed early for a change:) -- Mike ___________________________ Mike Tuersley CADalyst's AutoCAD Clinic Rand IMAGINiT Technologies
0 Likes