Any one know Visual Basic?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DiSoRdeR
    Pump enthusiast
    • Jul 2003
    • 1767

    #1

    Any one know Visual Basic?

    In my Visual Basic class were making our own projects, and I have no idea what I should do. Any one have any suggestions?
  • deadeye9
    The other deadeye.
    • Jan 2003
    • 323

    #2
    Paintball Forum.

    Comment

    • DiSoRdeR
      Pump enthusiast
      • Jul 2003
      • 1767

      #3
      Originally posted by deadeye9
      Paintball Forum.
      How am I supposed to make that? We have only learned how to make pictures and just got into making basic games. I was thinking of making Pacman, but do not know how to make him move.

      Comment

      • Will Wood
        Evil Monkey
        • May 2002
        • 3475

        #4
        Make.Calculator.
        Make.a.paint.program.
        make.a.screen.saver

        or.if.your.nuts..pong.
        expect.over.9k.lines

        Comment

        • slade
          Carpe Noctem
          • Apr 2004
          • 3442

          #5
          um, i know real basic... sorta... enough to make a slideshow of empress photos . maybe you could try making a game like this . its pretty simple.
          Last edited by slade; 10-27-2004, 12:09 PM.
          xvalve, ule body, logic vert frame, WWA barrel
          68/30 PE nitro tank
          cp unimount
          halo B

          Comment

          • OysterBoy
            Fatty McChubbercookie
            • Feb 2004
            • 1409

            #6
            I'm only just begginning to learn C+ / VBasic, but couldnt you (This is my pseudo-code interpretation) tag the W (or whatever key) to run process "-pacmanname- move West x 2cm" ? Obviously the actual coding would be different, but I'm sure you would need to tag your choice of key as Input, and not a process.... damn.. Is it process..? I'm such a big help..

            Unicorns are people too ...
            Old Narhwals are people too ...
            Grizzly Bears are people too ...
            Caterpillars are people too ...
            Baby Peacocks are people too ...
            lew "My hand was a little shaky and I released too soon."

            Comment

            • Jonneh
              A nice fellow.
              • May 2001
              • 990

              #7
              Visual basic is like programming for clowns!

              an extremely simple way of getting something to move around a window is to set up a timer object and for every tick of the timer, adjust the .top or .left attribute according to what button you're pressing.

              Try making a simple vertical shooter. You can make something follow the mouse in either one, or both dimensions by finding the appropriate mouse event thing, then moving whatever you're controlling to the X and/or Y returned by the mouse event. Very simple stuff.

              Good luck!

              edit: This works in the old skool version of visual basic. vb.net is much more oop, so I'm not sure things are as easy.

              Comment

              • DiSoRdeR
                Pump enthusiast
                • Jul 2003
                • 1767

                #8
                Originally posted by Jonneh
                Try making a simple vertical shooter.
                I was thinking about doing that, seeing as how we just learned how to But I was thinking of making pins, then I shoot a black ball up aka bowling lol

                Comment

                • DiSoRdeR
                  Pump enthusiast
                  • Jul 2003
                  • 1767

                  #9
                  Nevermind on the bowling idea, going to go for space invaders. How can I make a spaceship move with the arrow keys? I will try to find out with the book, but theres a couple thousand pages

                  Comment

                  • mikey101
                    aka murdoc
                    • Jun 2001
                    • 790

                    #10
                    best way to check and see if a key is being pressed is using the API GetAsyncKeyState, code should look something like this:

                    '// Declare the API
                    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal KeyCode As Integer) As Long

                    Private Sub Timer1_timer() '// Timer sub routine - loop every 100th of a second
                    Dim ksRet As Long '// Define the Variable
                    ksRet = GetAsyncKeyState(37) '//Assign to arrow key (37 = left, 40 = down, 38 = up, 39 = right)
                    If ksRet = -32767 Then '//if return statement shows it's pressed then...
                    '//make spaceship move accordingly.
                    End If
                    end sub

                    woo..it's been a little while, so that may not be perfect but it's worth a shot. hopefully this helps some.

                    Comment

                    • coopy18
                      Registered User
                      • Oct 2004
                      • 21

                      #11
                      Originally posted by mikey101
                      best way to check and see if a key is being pressed is using the API GetAsyncKeyState, code should look something like this:

                      '// Declare the API
                      Private Declare Function GetAsyncKeyState Lib "user32" (ByVal KeyCode As Integer) As Long

                      Private Sub Timer1_timer() '// Timer sub routine - loop every 100th of a second
                      Dim ksRet As Long '// Define the Variable
                      ksRet = GetAsyncKeyState(37) '//Assign to arrow key (37 = left, 40 = down, 38 = up, 39 = right)
                      If ksRet = -32767 Then '//if return statement shows it's pressed then...
                      '//make spaceship move accordingly.
                      End If
                      end sub

                      woo..it's been a little while, so that may not be perfect but it's worth a shot. hopefully this helps some.
                      If I remember correctly this doesn't capture all keystrokes (though it captures most of them) - VB6 was really wierd about that.

                      Disorder, I would recommend that you pick something that is interesting to you. I have been working as a software developer now for 7 years and I still learn more from messing around on projects for me than I do any other way.

                      Throw some subjects out here that you are interested in and maybe we can help you come up with a project. Who knows, we may even give you some pointers on writing it.

                      -coopy

                      Comment

                      • mikey101
                        aka murdoc
                        • Jun 2001
                        • 790

                        #12
                        If I remember correctly this doesn't capture all keystrokes (though it captures most of them) - VB6 was really wierd about that.
                        true, but for a small app with minimal ammount of code to loop through it shouldn't affect it too much. Only other way i know to capture key strokes is to do a system wide hook..and that gets pretty intense.

                        Comment

                        • DiSoRdeR
                          Pump enthusiast
                          • Jul 2003
                          • 1767

                          #13
                          As on now we havent learned any thing hard, we learned to draw lines, circles, triangles. We drew pictures using those, and now we have learn how to make things "shoot" a ball. I would like to make a space invaders game or asteriods. Only one problem I wouldnt be able to make the alien ships or asteriod able to move around. Also the only way I know how to "shoot" is by having it come out of the mouse, is there a way to make like a little space ship shoot instead? And have its movements with the keys instead of the mouse?

                          Comment

                          • OysterBoy
                            Fatty McChubbercookie
                            • Feb 2004
                            • 1409

                            #14
                            Originally posted by DiSoRdeR
                            As on now we havent learned any thing hard, we learned to draw lines, circles, triangles. We drew pictures using those, and now we have learn how to make things "shoot" a ball. I would like to make a space invaders game or asteriods. Only one problem I wouldnt be able to make the alien ships or asteriod able to move around. Also the only way I know how to "shoot" is by having it come out of the mouse, is there a way to make like a little space ship shoot instead? And have its movements with the keys instead of the mouse?

                            What about a simple target shooting game? Have it calculate points, and hit averages (Just cause itd be cool)

                            Unicorns are people too ...
                            Old Narhwals are people too ...
                            Grizzly Bears are people too ...
                            Caterpillars are people too ...
                            Baby Peacocks are people too ...
                            lew "My hand was a little shaky and I released too soon."

                            Comment

                            • DiSoRdeR
                              Pump enthusiast
                              • Jul 2003
                              • 1767

                              #15
                              Originally posted by OysterBoy
                              What about a simple target shooting game? Have it calculate points, and hit averages (Just cause itd be cool)
                              That would be cool, but I have no idea how to make something like that. The person necxt to me made a counter before, dont know how he did it though.

                              Comment

                              Working...