Results 1 to 13 of 13

Thread: VB .net paint history 2d array help

  1. #1
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default VB .net paint history 2d array help

    I pasted the code into paste bin at http://pastebin.com/aWVms2ju, to try the code, create a new windows forms application in visual basic .net, make sure the form is named form1 and then replace the form1.vb with that code in paste bin


    The goal is to make a history of what was painted onto the form. This is just a little piece of the program I am making and it is one of two major problems I am having :[.

    The two dimensional array gives a null reference error if I don’t assign it that value where I declared it. Now it is saying the index is out of array bounds. I don’t understand this because it is a dynamically expanding array... or so I thought.
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    I'm not sure if this would help, but maybe try a collection? I always liked them more. And I thought they were much easier for dynamic "arrays."

  3. #3
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    google says a dynamic array is a collection...?
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    >_> You don't know what a collection is? http://articles.techrepublic.com.com...1-5800272.html <-- First google link for "collection vb6"

  5. #5
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i just searched collection. cuz i dont use vb6 -.-
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  6. #6
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    What do you use?

  7. #7
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    vb .net 2010 ultimate
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  8. #8
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Collections are the same.

  9. #9
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh. lol. well google makes it sound like arrays are a kind of a colletion. so what is the difference?
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  10. #10
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    How they're used. Collections are easier, in my opinion. Coll.Add("wat") is all you need to do to add something to the collection, I think. Sorry, I don't like VB.

  11. #11
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol. im pretty sure u can do that with arrays in vb too :P. lol. ty though
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  12. #12
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Just try a collection. None of these posts would've happened if you would've just tried it, and your problem would've most likely been solved.

    And if a collection doesn't work, then I'm sure I can help you if I actually take a little time to explain it.

  13. #13
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    http://pastebin.com/R9gdx8LC

    that is my sad attempt at using the collection but it isnt working. am i doing it wrong??
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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