VB question, Please help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

motocross95

Thread Starter
Joined
Oct 30, 2001
Messages
110
Well I am trying to make a visual basic program that is like the game of craps. Well you roll dice and what not. It has two forms. One with a command button, I would like it when you press that command button it runs some loops and what not on an image in form 2. Form1 has pictures of dice, when you press the command button on form 2 it moves the dice 2 around the screen on form 1. Anyone know how to do this? That is priority number 1. I don't plan on being able to get priority number 2, but if someone could help me it would be greatly appreciated. As it is now I have the knowledge to be able to move it around the screen by running a loop but the angles are all the same. I get this effect by either adding 1 or subtracting 1 to the image1.left and image1.top values. I would like to make it bounce better at different angles. Does anyone understand exactly what I mean? I hope so. Please help. Because with priority number 2 I have been trying to do something like that for some time now and have yet to figure it out. Thank you for all your help. I can be reached on AIM at SeanTuble as well.
 

motocross95

Thread Starter
Joined
Oct 30, 2001
Messages
110
well yes, but what I am asking about isn't part of the project it's just extra. We just need to make a craps program that's all.
 
R

ren

depends on the images of the dice
if u could have 6 seperate images of a single die in different positions
have 2 seperate image controls
then have some code like

Dim AValue, BValue
Randomize
AValue= Int((6 * Rnd) + 1)
BValue= Int((6 * Rnd) + 1)

'then an if section

if Avalue = 6 then
Set num6 = LoadPicture("dice6.bmp")
Set image1.Picture = num6
end if
etc....

are the images of the dice you have more complex than this?
 

motocross95

Thread Starter
Joined
Oct 30, 2001
Messages
110
I handed in the program and didn't worry about that. Thank you anyway. Now that I think about it I might have another idea as to how to do it, but have no motivation right now. Thanks again.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top