Results 1 to 2 of 2

Thread: End of dynamic arrays/ Listboxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    5

    End of dynamic arrays/ Listboxes

    Hey,

    i have a dynamic array, is there a way to mark the end of a dynamic array so that you know how large it is??

    I also have a listbox, is there a condition you can create that says "if an item is not selected do something"??

    thanks

  2. #2
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: End of dynamic arrays/ Listboxes

    VB Code:
    1. Dim MyArr() As String
    2. MyArr.GetUpperBound(0) ' The 0 means that you want the first dimension upper bound
    3. ' If you had a multi-dimensional array, you would use a number other than 0 to
    4. ' get different upper bounds for different dimensions
    5. MyListBox.Items.Count - 1 ' for list box upper bound
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width