ComboBox and Intersect/Union polygons

Discussion created by ckatie on Jan 20, 2012
Latest reply on Feb 1, 2012 by jbarry-esristaff

Unfortunately, I am completly new in programming. In general, I have used an Extending ArcObjects template (Windows Application (Desktop) for Visual Basic 2008 Express Edition and created a MainForm, which consists of a TOC (axTOCControl), a data frame (axMapControl) and a tool bar (AxToolbar). The TOC and the Toollbar are buddy controlled by the axMapControl.
Within the software, no project is specified. The data can be added manually (add data). Also, an .mxd project can be added using open. So far, so good.

I would like to add the functions "Intersect" and "Union" from the ArcGIS Analysis Toolbox to determine the intersections of two polygons and create the result as a new output shapefile. The calculated polygons should be selectable variable and should not be fixed directly within the source code. Therfor, I have added a new WindowsForm to the MainForm, which shoul act as own created toolbox. On this added WindowsForm, I placed 2 ComboBoxes (input feature and intersect/union feature) which should be selection boxes for polygons.

Now I became the problem, that it is not possible to select a polygon within the ComboBox based on the contents within the TOC. Furthermore I didn't know how to combine the Intersect and union command and the needed polygon within the created Comobox.

Could anyone help me?