Tag Info

New answers tagged


When your form is opened and then closed then your combo box cmblayer is disposed. so it is null. To solve this situation, handle your from load event (create a method and event listener) and put your codes there: private void frmRestaurentViewer_OnFormLoadEvent() { IMxDocument doc = m_application.Document as IMxDocument; IMap pMap = doc.FocusMap; ILayer ...


When you're done with an ICursor or IFeatureCursor, you need to release the underlying COM object. This can be done via ReleaseCOMObject or better yet, FinalReleaseCOMObject. Do this repeatedly if you're inside a loop where you're passing the same ICursor reference repeatedly to ISelectionset.Search.

Top 50 recent answers are included