1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

VB question, Please help

Discussion in 'Software Development' started by motocross95, Nov 29, 2001.

Thread Status:
Not open for further replies.
Advertisement
  1. motocross95

    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.
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Is this for a school project or something?
     
  3. motocross95

    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.
     
  4. ren

    ren Guest

    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?
     
  5. motocross95

    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.
     
  6. Sponsor

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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/60079

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice