Make A Bouncing Ball - Built Their Codes?

Dec 30, 2009

I am now trying to make a bouncing ball in vb 2008, ofc i looked at some guides first to see how they built their codes

Public Class Form1
Dim m_Dx As Integer
Dim m_Dy As Integer[code]....

As you see there are many variables

View 4 Replies


ADVERTISEMENT

Making A Bouncing Ball?

May 14, 2011

I am trying to make a Bouncing ball, not with an ovalshape but with a graphic. This is the code so far.

Public Class Form1
Private r_index As Integer
Private startx As Integer

[code].....

View 14 Replies

Game - Bouncing Ball With Paddle

Feb 13, 2010

Write an application that allows the user to play a game, in which the goal is to prevent a bouncing ball from falling off the bottom of the Form. When the user presses the S key, a blue ball bounces off the top, left and right sides (the �walls�) of the Form. A horizontal bar on the bottom of the Form serves as a paddle to prevent the ball from hitting the bottom of the Form. (The ball can bounce off the paddle, but not the bottom of the Form.) The user can move the paddle using the left and right arrow keys. If the ball hits the paddle, it bounces up, and the game continues. If the ball hits the bottom of the Form, the game ends. The paddle�s width decreases every 30 seconds to make the game more challenging.

View 4 Replies

Arkanoid Type Game - Bouncing A Ball Off A Surface That Disapears?

Jul 7, 2010

I have a timer that bounces the ball around. It has 2 separate parts, one for bouncing off the wall and paddle, and one for hitting a block.It touches the block and the block is suppose to disappear, it then bounces away and should not bounce where the block is again because it is gone ,So basically the problem I'm having is, every time I add a line that tells it not to bounce off the block if it is not visible, it hits the top of the block (which is the side I'm testing) and seems to get stuck on a horizontal line and just bounces left and right.Here's my timer code.

vb

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'This top line below reads the last 'thespeedx/y' value and applies it to the new location information of the ball (which will be called shpcircle) This determines the direction, based on a constant speed[code].....

View 2 Replies

Bouncing Ball Game Application - Move The Paddle Left And Right ?

Apr 29, 2012

I have to make a bouncing ball game application. all the code is given to me except for code to move the paddle left and right, and code to start the game. i have to write an if...then statement in a keydown event handler that tests whether the user presses the s key. i then have to add an elseif statement that tests whether the user pressed the left-arrow key and whether the paddle's horizontal position (rectangleX) is greater than zero. if the paddle's horizontal position equals zero, the left edge of the paddle is touching the left wall and the paddle should not be allowed to move farther to the left( i am not sure how to do this part). if the conditions are true in the if then statement, the paddle's x-position should decrease by 10. then i need an elseif statement that tests whether the right arrow key is pressed and whether the paddles x-coord is less than the width of the form minus the width of the paddle. if it equals out the paddle should not be allowed to move farther right. if both conditions are true the paddles x-coordinate is increased by 10

This is the code i have written:

Private Sub BouncingBallForm_Keydown(ByVal sender As Object, _
ByVal s As System.Windows.Forms.KeyEventArgs) _
Handles BouncingBallForm.Keydown

[CODE]...

View 1 Replies

New Years Ball Drop - Timer To Count Down From 30 And Reach 0 When The Ball Is At The End Of The Pole?

Apr 5, 2011

I have a this program I have to write but I have no clue where to even start.New Years Ball Drop?Design a program that replicates the Times Square New Year�s Eve ball drop. You can use a picture from the Internet of the ball you wish to use.Functionality Requirements:

-The ball will take exactly 30 seconds to move down the pole

-Need a timer to count down from 30 and reach 0 when the ball is at the end of the pole

-The timer will randomly change colour every few seconds

- When the ball has finished descending, the text �Happy New Year!� will display on the screen

-Need a button on the form that, when clicked, stops the ball drop and timer (so screenshots can be taken). When the button is clicked again, the timer and ball drop should resume from where it left off.

View 1 Replies

Make A Bouncing Picture Box ?

Mar 11, 2009

Im trying to make a bouncing picture box thing, here is what i got

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Speed As Single = 25 ' Ball Speed
Dim rndInst As New Random ' Random Instance

[CODE]...

I have no errors, but the picture box is not bouncing.

View 14 Replies

Make The Ball Move Faster?

Apr 26, 2011

how to change the balls speed

View 2 Replies

VS 2005 : Make The Ball Bounce Around The Desktop?

Sep 3, 2009

Ive been experimenting with physics of objects in visual basic and what (a boucing ball) and Ive been wanting to take it the step further, make the ball bounce around the desktop. but how.

View 5 Replies

Make A Program That Will Calculate The Height Of A Falling Ball?

Nov 4, 2009

I am trying to make a program that will calculate the height of a falling ball for every .25 seconds starting at 0 and going till the height = 0 or until 10 items have been listed. I have started the code, but it just isnt working out!

Dim h, time as double
Dim aftert as integer
Do While h>0

[Code]....

I get an "expression needed" error from the &time& and nothing is displayed in the list box. Not to mention, I have no idea what to put in the loop or how to limit the list to 10 items or until the ball hits 0.

View 4 Replies

Make User Manual Built-in?

Apr 29, 2009

I had an idea to embed a PDF document into my application somehow.The PDF is a copy of the user manual. I expect that the file will be around 20 KB. This way, if people don't distribute the PDF with my app, they can extract it whenever they need to.

View 3 Replies

Make A Loop Of Generating Codes?

Mar 18, 2010

I wanted to know how to make a loop of generating codes, that I create (from the push of button1) Like this:

Dim MsgBox As String
MsgBox = ("My code here, not a random one")
TextBox1.Text = MsgBox

[code].....

View 3 Replies

VS 2008 : Make Line Of Codes To Tag Like Dim?

Dec 4, 2009

I have whole list of code. If i press button1 then happens.

[----------CODE HERE----------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]

[code]....

View 2 Replies

Use Code That Is Built In A Dynamically Built Assembly?

Jun 29, 2010

Is it possible to immediately use code that is built in a dynamically built assembly?I would like to create an instance of an ENUM built using.http:[url]......

View 4 Replies

VS 2008 Make A Loop Of Generating Codes?

May 10, 2009

I wanted to know how to make a loop of generating codes, that I create (from the push of button1) Like this:

Dim MsgBox As String
MsgBox = ("My code here, not a random one")
TextBox1.Text = MsgBox

I want the textbox's code to change into another code, that i want, from the push of button1?

View 23 Replies

Forms :: Experts Modify UPDATE Codes According To INSERT Codes Style

Dec 25, 2009

Dear Experts modify UPDATE codes according to INSERT codes Style.

[Code].....

I need update codes as there are insert codes

View 1 Replies

Use The BackgroundWorker Built Into VB To Create A Thing To Make It Listen For Incoming Messages?

Mar 13, 2008

I want my application to be able to communicate 2-way between the application on another computer and the host server which will be running on my computer.I want to use the BackgroundWorker built into vb to create a thing to make it listen for incoming messages, and also send out messages to the client.The client needs to listen and receive, same as the server, because both need to communicate with one another.I do not know how I can make it do either sending nor receiving.I would be using two different background workers to keep the code seperated and organized so that I will understand what code is for what.

I want the code to say that if i receive the message "Apple" without the "" and cap sensitive, then it will change Label1.Text = "That worked, word received Apple" or something similar to that. ( This is because I am ignorant and I want it to interpret the text sent through to figure out what the application is supposed to do, and last time I couldn't figure out how to make it do something when a certain text was received.

View 1 Replies

VS 2008 Make A DLL-reading Program To Use Its Codes Inside?

Apr 18, 2011

I would like to create an application that can browse the DLL file and use the codes inside it. Not by adding it as a reference, or something. Just browsing the DLL file to use the codes inside it.

View 7 Replies

Make Program To Find Numbers On Form And Do That Without Making So Many 'Same' Codes?

Dec 18, 2011

[code]How i can make The Program to find Numbers On Form and Do That without making So Many "Same" Codes?Its Pretty Annoying To Make Big Program nad only Copying and Pasting Text.

View 3 Replies

Collision Detection And Bouncing Off?

Apr 28, 2009

I am trying to do simple collision detection in VB.NET using picture boxes, I have a fixed picturebox, (colour Green), and a moving picturebox, (colour Red). I can manage the collision detection OK, but how do make the movingpicture box bounce off the fixed picturebox and at the right angle? In the following code the moving picturebox sometimes passes right through the fixed one, but not everytime.

ublic Class Form1
Private RedXSpeed As Single = 5
Private RedYSpeed As Single = 5

[code].....

View 1 Replies

VS 2010 - Make A Program That Generate 3 Codes To A Word Document And Adding A Prefix

Oct 2, 2010

I want to make a program that generate 3 codes to a word document and adding a prefix before each code

Example:
TextBox1.Text = 355855026164242
TextBox2.Text = 40324003
TextBox3.Text = 58458844

Want these codes to go to document like this:
IMEI:355855026164242
Code1:40324003
Code2:58458844

View 5 Replies

VS 2008 Create A Bouncing Picture Box Control?

Jan 10, 2010

in creating a bouncing Picture Box Control.I want the picture box control bounces top-bottom tried like this

picturebox1.top=top+3
picturebox.top=top-6

View 13 Replies

Cannot Get The Ball To Return To Its Original Position?

Nov 9, 2009

in school im making a dodge ball game but i cannot get the ball to return to its original position. My code and form are below

[Code]...

View 6 Replies

Picturebox Changing Image Into A Ball

Mar 31, 2012

I am trying to make a 'puppet' change into a ball when I press e.g. the right arrow key. I used getasynckeystate(keys.right) to check for the key in a timer. The moving is working well but I don't have an idea how I can make it change in a picture of the 'puppet' changing which then changes into a ball. Does someone know how to do this?

View 3 Replies

Move An Image (technically A Powerpacks Ball...)?

Oct 3, 2011

I'm attempting to move an image (technically a Powerpacks ball...).

Public Class Form1
Dim XSpeed As Decimal
Dim YSpeed As Decimal
Dim BallLocation As New Point(Ball.location.x, Ball.location.y)

[code].....

View 4 Replies

Set The Computer Player To Move According To The Ball's Position?

Nov 22, 2010

I'm coding the game timer, but am noticing that the gameBall is undeclared and don't see it in the tutorial.Private Sub gameTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gameTimer.Tick

[Code]...

View 5 Replies

When Import Background My Ball Speed Slows Down?

Jan 17, 2010

I just finished working on my school vb project - breakout. As soon as i import background my ball speed slows down dramatically. I used 1.25mb bmp, 40kb jpg, and lower resolution copies of both but i get the same result. In my game i use bitmaps for bricks, platform and the ball along with a timer and draw e.graphics function. How can i illuminate the reduction of the speed of the ball when i add my background?

View 3 Replies

Create A Magic 8 Ball That Would Display Answers Via Array?

Apr 17, 2011

The goal in this assignment was to create a Magic 8 Ball that would display answers via array.Here's what I got down so far, now I apologize once again, I forgot most of the stuff so I don't even know if it is REMOTELY close to what it's suppose to be

Public Class Form1
Dim ArrayRes(7) As String
Private Sub btnASK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnASK.Click

[code]....

View 4 Replies

Define The Length Of The Array Ball() In Tinnings Structure To 6?

Feb 12, 2010

Structure Tinnings
Dim bowler As String
Dim ball() As tballs
End Structure

[code].....

how can i now define the length of the array ball() in Tinnings structure to 6, (its a cricket program, with 6 runs in an over).

View 3 Replies

Text Boxes And Formulas - Calculate The Velocity Of A Ball Thrown In The Air

Mar 20, 2011

how to create this certain program. In short, I must calculate the velocity of a ball thrown in the air after 1, 2, and 3 seconds. The formula for this is: -16t^2 +velocity(t)+height. the height for the ball is 5 feet per-second. So after defining each textbox of 1 sec, 2 sec, and 3 secs (Dim stuff) I need the button click to run through the formula then display the result for each second. How would I do this?

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved