Designing Blackjack

This project uses many of the tools discussed in previous chapters of this book, including various code structures and common ActiveX controls. In particular, the project includes additional tools discussed in this chapter. These tools include UserForms and their code modules, along with Frame, and Combo Box controls.

The Blackjack game runs from a VBA form that contains several ActiveX controls. The form is separated into a Dealer area and a Player area using Frame controls. The dealer frame contains these ActiveX controls:

• Five Image controls for displaying images of cards representing the dealer's hand.

• A Combo Box control (used as a dropdown list) so the player can choose the number of decks (52 cards per deck) used in the game.

• A Label control for displaying the score of the dealer's hand.

The player frame contains these ActiveX controls:

• Five Image controls for displaying images of cards representing the player's hand.

• A Combo Box control for the player to enter or select an amount to bet.

• A Label control for displaying the player's score.

• A Label control for displaying the player's current balance.

• A Command Button control for beginning and selecting a new game.

• A Command Button control for selecting another draw from the deck.

A single Label control displays the result of each hand. Figure 6.16 shows the Blackjack form (named frmTable) interface with the previously listed ActiveX controls. Table 6.6 lists the settings of a few select properties of the ActiveX controls added to the Blackjack form. In most instances, font, color, and size properties were also changed from their default values, but are not listed in the table.

Biorhythm Awareness

Biorhythm Awareness

Who else wants to take advantage of biorhythm awareness to avoid premature death, escape life threatening diseases, eliminate most of your life altering mistakes and banish catastrophic events from your life.

Get My Free Ebook


Post a comment