Re: Counting game in 'Craps' game

Hi,

Am new to VB am doing a project in college for 'Craps' game. I would like to know is there anyway of putting and option for'Ok and Cancel' to appear in message box? if the the entrant is placed over a certain amount, and can this be set up in a 'If' statement using a some text.

Also, I would like the user to how much they've placed on a bet, say a continuation amonut of how much they've placed, does know any code that could help? Also a code for how much you've won. Have already set the code for count of number of Wins and Loses, again any code would be helpful. Thanks.

Comments

  • : Hi,
    :
    : Am new to VB am doing a project in college for 'Craps' game. I
    : would like to know is there anyway of putting and option for'Ok and
    : Cancel' to appear in message box?

    [code]
    Dim mbRet As vbMsgBoxResult

    mbRet = MsgBox("Ok or cancel?", vbOkCancel)

    If mbRet = vbOk Then
    ...
    Else
    ...
    End If
    [/code]

    : Also, I would like the user to how much they've placed on a bet, say
    : a continuation amonut of how much they've placed, does know any code
    : that could help?

    I am not entirely sure what you mean, but it should be easy to code.

    : Also a code for how much you've won. Have already
    : set the code for count of number of Wins and Loses, again any code
    : would be helpful. Thanks.
    :

    Well, if you already have the numbers, then the display is entirely up to you.
    Neatest is to create a Label control for each of the results and do something like:
    [code]
    Label1.Caption = "Games won: " & nWon
    [/code]
    Where nWon is the variable you store the Win amount in.

    Happy coding :)


    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion