Search results for query: *

  1. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  2. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  3. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  4. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  5. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  6. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  7. G

    Question Set Listbox Checked problem on load, activate, shown event

    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...
  8. G

    Set property of parent class from child

    Thanks very much for that, InertiaM! That is such a simple way to do it. I will definately give this a try.
  9. G

    Set property of parent class from child

    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...
  10. G

    Question Searching a generic list

    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.
  11. G

    Question Searching a generic list

    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...
  12. G

    Question Setting properties of existing class

    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...
Back
Top