Announcement

Collapse
No announcement yet.

Visual Basic Thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Visual Basic Thread

    Who here at the Pav knows Visual Basic? Just curious.

    I don't know how other VB's relate to one another as far as code wise...I'm using 6.0.

    Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

    #2
    Re: Visual Basic Thread

    I was in the process of learning it a few years ago but lost motivation and stopped.
    Screenshot Let's Plays

    Comment


      #3
      Re: Visual Basic Thread

      Why'd you lose motivation?

      Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

      Comment


        #4
        Re: Visual Basic Thread

        Lazyness
        Screenshot Let's Plays

        Comment


          #5
          Re: Visual Basic Thread

          I've done a little bit of programming using VB; why do you ask?


          How Badly Do You Want It? (VX Ace) is now available for download! - no outside software necessary.

          "I live and love in God's peculiar light." - Michelangelo

          Comment


            #6
            Re: Visual Basic Thread

            I'm taking a class in it right now actually.
            Games:

            SS World (RPGM2) Extravaganzicon Contest Winner
            A Ronin Story (RPGM3)
            SS World 2 (RPGM2)

            Comment


              #7
              Re: Visual Basic Thread

              I took a class in VB. Don't really feel like I know anything though. But I still have the book so if you've got a question maybe I could look it up.
              I want that Mulan McNugget sauce, Morty!

              Comment


                #8
                Re: Visual Basic Thread

                One I'm just curious as to who does and two I have questions every so often and online help doesnt help at all, and the MSDN is a little too confusing sometimes(Ive self taught myself everything I know)

                When I need something new I havent used before, I find out how to do it, but every so often I stumble across something I need that I dont really know how to set up.

                Such as matrices, Ive seen plenty of tutorials but none of them explains the step by step things I have to do to use them, I believe I knew how to use them way back when but have forgotten, and nothing I see rings a bell so I may not have ever actually used them.

                I need a 65x65 matrix for my RPGM1 map-maker(plus a few other games Im working on that will make things a LOT easier), and I need an easy way of inserting all 4,225 tiles codes that are on a map into the matrix...nesting For()/Next's to "read" them would be easy, I can do that without a problem, the problem is finding out how to insert all 4225 values into the matrix without using up too much coding/time.

                The first grid I need to map can be found here.
                Last edited by JPS; 03-25-2008, 04:07 PM.

                Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

                Comment


                  #9
                  Re: Visual Basic Thread

                  I am currently reading "Making a Website for DUMMIES" (And I'm only 12 ) They talk about VB in there a lot so I'll probably learn some of it soon lol...

                  "There's Nothing better than a drunken Russian singing Italian opera"

                  Comment


                    #10
                    Re: Visual Basic Thread

                    Couldn't you input the values in the same fashion that you read them? Thats how I fill arrays (one, two, and three dimensional).
                    stodi no na ka cenba

                    Comment


                      #11
                      Re: Visual Basic Thread

                      how do you create a matrix?

                      Dim MatrixA(65,65)

                      ?

                      Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

                      Comment


                        #12
                        Re: Visual Basic Thread

                        Do you know how to make arrays? Show me how to make an array in VB and I might be able to help you. I took a programming class about 4 years ago that used VB6, but I don't remember much.
                        stodi no na ka cenba

                        Comment


                          #13
                          Re: Visual Basic Thread

                          Im not sure how to do an array I dont think

                          I use:

                          Dim ListA([number])

                          all the time, dont think thats an array though

                          It doesnt sound like I know a lot...I know a lot of basic stuff, just nothing about calling up dll's and animation and stuff
                          Last edited by JPS; 03-26-2008, 12:18 AM.

                          Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

                          Comment


                            #14
                            Re: Visual Basic Thread

                            Try this, to make a 2-dimensional array:

                            Dim ListA(65,65)

                            Are the brackets necessary? If so, I'm sure you can figure out where to put them. Lists are collections, same as an Array.
                            stodi no na ka cenba

                            Comment


                              #15
                              Re: Visual Basic Thread

                              Thats where Im going to have problems, I'm going to have so many loops to just create a grid it wont be funny, thats why I was initially using string variables, like this:

                              Code:
                              a1$ = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
                              a2$ = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
                              a3$ = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
                              etc...
                              and then calling them up with this:
                              Code:
                              For zz = 0 To 1040 Step 16 'Icons are 16 pixels wide
                              For x = 1 To 1041 Step 3 'Beginning of next number is every 3 characters in string
                              s$ = Mid$(a1, x, 2)
                              DrawMap
                              Next
                              Next
                              
                              Public Sub DrawMap
                              If s$ = "01" Then PaintPicture b1.Picture, x * 5 + 1, zz
                              If s$ = "02" Then PaintPicture b2.Picture, x * 5 + 1, zz
                              If s$ = "03" Then PaintPicture b3.Picture, x * 5 + 1, zz
                              If s$ = "04" Then PaintPicture b4.Picture, x * 5 + 1, zz
                              If s$ = "05" Then PaintPicture b5.Picture, x * 5 + 1, zz
                              If s$ = "06" Then PaintPicture b6.Picture, x * 5 + 1, zz
                              If s$ = "07" Then PaintPicture b7.Picture, x * 5 + 1, zz
                              If s$ = "08" Then PaintPicture b8.Picture, x * 5 + 1, zz
                              If s$ = "09" Then PaintPicture b9.Picture, x * 5 + 1, zz
                              If s$ = "10" Then PaintPicture b10.Picture, x * 5 + 1, zz
                              If s$ = "11" Then PaintPicture b11.Picture, x * 5 + 1, zz
                              If s$ = "12" Then PaintPicture b12.Picture, x * 5 + 1, zz
                              If s$ = "13" Then PaintPicture b13.Picture, x * 5 + 1, zz
                              If s$ = "14" Then PaintPicture b14.Picture, x * 5 + 1, zz
                              If s$ = "15" Then PaintPicture b15.Picture, x * 5 + 1, zz
                              If s$ = "16" Then PaintPicture b16.Picture, x * 5 + 1, zz
                              If s$ = "17" Then PaintPicture b17.Picture, x * 5 + 1, zz
                              If s$ = "18" Then PaintPicture b18.Picture, x * 5 + 1, zz
                              If s$ = "19" Then PaintPicture b19.Picture, x * 5 + 1, zz
                              End Sub
                              But the problem with that is I would need that chunk of code at the top 65 times because Ill have to access a1, a2, a3.. using a Mid$(), and the string part of the Mid$ cant be called up any way other way beside direct input(as seen above), and if I do that it'll return a "Procedure Too Large" error.

                              The matrix would make drawing it easier, but I need to make the input easier, Id like to use a matrix for it, but I dont know if I'll be able too..

                              Is there a way to fill an entire matrix row all at once? I know this doesnt work this is just to give you an idea of what Im talking about:
                              Code:
                              For x=1 to 65
                              MatrixA(x,1) = "19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19"
                              Next
                              Or will I end up nesting all those loops together?

                              I suppose it would be possible to have the program break strings apart and insert each value automatically into the matrix, kind of like what I did with the first example.
                              Last edited by JPS; 03-26-2008, 08:12 AM.

                              Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

                              Comment

                              Working...
                              X