Communicating between windows application and class library

423
1
03-22-2013 01:25 PM
JoeMcCollum
New Contributor
As some have pointed out, there are some things that cannot be done in a Windows Application (go into VB.net and create "Windows Application.  You can launch ArcMap and load a shapefile but not color it.) 

So you need a Class Library.  Is there some way to attach a form to a class library?  I need some user input. 

I tried using the form in the Windows Application, then writing a shapefile in the Windows Application then reading it back in in the Class Library.  That seems to not work.
0 Kudos
1 Reply
RichardWatson
Frequent Contributor
I assume that you are writing a standalone application here, i.e. not in the context of ArcMap.

In this case whether you put the code in an application (EXE) or a class library (DLL) does not matter.  It is just code.  The only reason to put in a class library is to make your code modular potentially for reusability.

Class libraries can have forms.  When you compile a class library it produces a DLL which has to be loaded into a host process (EXE).  If the host process is ArcMap then you have a very rich set of functionality available to you.  If the host process is a standalone application (e.g. YourProgram.exe) then the set of functionality is more limited.  So what limits you is functionality provided by the host process.
0 Kudos