Thread: Visual Basic Question

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    38

    Visual Basic Question

    Ok, I realize this is not the place for this, but I've got lots of help off this forum and thought hey its worth a try. I'm sure a lot of you know more that one programming language, but if you don't think its ok to answer this on a c++ board, please direct me to where I can get some assistance. It's a basic question. Or someone could pm me.

    Basicly I would just like to know how I could go about arranging a listbox by last name. I've read about array.sort, but I mean if you wanted to do it the long way around. I'm learning visual and C++ at the same time so I thought it would help me see a few things. In general, its a program that you input info about people and it stores them on a .dat, then when you retreive them it gives them back to you.

    I realize that you can sort with a build-in command and the array.sort, but if you wanted to do it the long way around, how would you go about it. Thanks.

  2. #2
    Registered User
    Join Date
    Jun 2003
    Posts
    361
    ...trouble in the making...

    [EDIT]
    A PMed reply is on the way, but this space is best left for C++ question
    [/EDIT]
    Last edited by Epo; 11-18-2004 at 08:35 AM.

  3. #3

  4. #4
    Registered User
    Join Date
    Nov 2004
    Location
    bombay
    Posts
    6
    well u could use the bubble sort algorithm to sort it

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Visual Basic's arithmetic operators are overloaded to work on strings. But this sorting you are talking about is natively supported by the Windows API list box class.

  6. #6
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    also, on the object properties i seem to remember there being a 'sorted' checkbox, which sorts the list for you. ( its been a while since i used vb)
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Replies: 1
    Last Post: 04-20-2002, 06:49 AM
  4. Moving from Visual Basic to Visual C++
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 04-10-2002, 09:57 PM
  5. Visual Basic
    By nsk in forum C++ Programming
    Replies: 1
    Last Post: 11-23-2001, 07:36 PM