I also tried your code you posted, using a button to call the form and got the this error:
"The value of argument 'value' (-1) is invalid for Enum type 'CheckState'.
Parameter name: value"
The error happens only when I try to set the checkstate with boolean 'true' or 'false' - when I use...
I have some trouble loading the items in the New event. The form is initialized by a button in ArcMap (ESRI ArcGIS software - 9.2). The button passes a reference to the current map document to the form:
Public Overrides Sub OnCreate(ByVal hook As Object)
If Not hook Is Nothing Then...
Commenting out this line does prevent the error from occurring.
I believe the problem is that the item in the listbox cannot be set as "Checked" because it has not been fully initialized and does not exist yet. I have tried putting this code in the 'activate' and 'shown' event code, however...
Thank you for your help!
Now I'm able to see the error: "Object reference not set to an instance of an object"
I have read other people having the same problem. Just setting items in a check listbox as "checked" within the load or activate events will cause this error. Has anyone found a...
Here is the code for the command that calls the form.
Imports System.Runtime.InteropServices
Imports System.Drawing
Imports ESRI.ArcGIS.ADF.BaseClasses
Imports ESRI.ArcGIS.ADF.CATIDs
Imports ESRI.ArcGIS.Framework
Imports ESRI.ArcGIS.ArcMapUI
<ComClass(OpenOptions.ClassId...
No, my checklistbox is not databound. I am translating from vb6 at the moment and have no experience with databinding and haven't a clue how to implement it.
A button in embedded in the GIS software ArcMap will open a form. It reads the layers present and loads their names into a listbox...
Hi,
I've been having a problem setting certain items in a listbox as checked when the form is loaded. I have tried putting the code in the form_activate, form_load, and form_shown events and each still crashes when it encounters:
Dim m As Integer = 0
Me.lstLineLayers.SetItemChecked(m...
Hi,
I would like to have a form class that is called from a button on a parent form and would like a button on the child form to set a property on the parent form. Can anyone explain the best way to go about this or direct me to a good article?
In the parent class:
Private Sub...
Thanks, Ty. That article was just what I was looking for.
Also, thx MattP. I had seen this article but will take a closer look at it in the coming days.
Hi,
I have been reading extensively about searching generic lists in VB.NET with the usage of delegates. However, I still cannot seem to grasp how to achieve what I want to, which I believe is frustratingly simple!
I have a list populated with instances of an object with three parameters...
Hi there,
This is likely a beginner question but here I am anyway. I am programming an extension for ArcGIS Desktop and the extension class instantiates an IPersist (or IPersistVariant) interface that allows parameters from the extension to be stored until next use.
I want to use a separate...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.