Using Images In VB For A Blackjack Game?

Apr 29, 2011

My classmates said I was crazy when I told them I was re-making my old blackjack game in VB.It's actually been going a lot easier than it was when I was doing it in C#, though. I'm hitting some snags, which are commented on in the code. The basic logic is mostly right.My main question is how would I add images to the game? Where would I put them? How would I make sure the suits are randomized, too?

New Code:
Public Class FRM_BlackJack
Private Sub FRM_BlackJack_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code].....

View 6 Replies


ADVERTISEMENT

Graphics And Blackjack Game?

May 3, 2011

I'm making a blackjack game for class. Your PlayingCard class totally rocks! I think I said that already Anyway, my board is set up very simply; the player and the dealer have hands with a limit of 5 cards, which I drew as picture-boxes. "sigh" I thought I had this all thought out; the LOGIC of the game was easy in C# console, but applying graphics just adds a whole other dimension to EVERYTHING!

1) Do I need to create an object for each picture-box?

2) How do I tell the program to use cards and their values created in the PlayingCard class to the picture-boxes?

Public Class FRM_BlackJack
'Global Variables
Dim PlayerCards(4) As PlayingCard.Hand

[code]....

View 2 Replies

How To Make BlackJack Game On VB

Dec 1, 2011

I am making a simple blackjack game for school.It involves using object arrays and for next loops.I have 5 labels for the player, and 5 labels for the dealer. I have both their totals displayed on the form. I also have a deal, hit and stand button. I also need to follow the rules of if the dealer >= to 17 they must stand and if the dealer is < 17 they must hit. Does anybody have any suggestions on how i can code the dealers turn.I already made it so the player clicks hit and when he/she is done clicks stand. This is my stand button so far:

lblTotalDealer.Show()
lblD1.Show()
Dim itemarray2() As Label = {lblD1, lblD2, lblD3, lblD4, lblD5}

[code].....

View 14 Replies

IF Function - Blackjack Game - Change Value ?

Apr 2, 2011

I am having trouble with a blackjack game I am creating. I have buttons 1 - 13 (A-K) I have 5 Textboxes which when the above buttons are pressed displays the values in the textboxes. I also have one more textbox which adds up the values of the above 5 textboxes to give your Black Jack Total. The problem I have is if an Ace (11) is in one of the textboxes and the Total Value exceeds 21 i need to have the Ace (11) change its value to 1 instead.

textbox 1 - 5 will be the card values
textbox6.text will be the total Value

I have tried......

if textbox6.text > 21 then and textbox1.text = 11 then textbox1.text = 1

This seems to work fine however it only solves the problem of an Ace (11) appearing in textbox1.text so i tried to repeat the code with the other boxes...

if textbox6.text > 21 then and textbox1.text = 11 then textbox1.text = 1
if textbox6.text > 21 then and textbox2.text = 11 then textbox2.text = 1
if textbox6.text > 21 then and textbox3.text = 11 then textbox3.text = 1

[CODE]...

However this does not work and my program freezes?

View 3 Replies

Making A Blackjack Game For Class?

May 2, 2011

I'm making a blackjack game for class. It's been better programming in VB than it has in C#, but I don't know how to link button subs (BTN_Deal_Click or BTN_Deal; I can't decide which one will work) to one another. For example, after the code in BTN_Deal has been run, the program is supposed to wait for the user to click either the Hit or the Stand button.

[Code]...

View 2 Replies

Saving Results In Blackjack Game

Mar 11, 2010

I need a small bit of help with my Black Jack game in VB 2005. Basically I have the game pretty much complete seems to work perfectly, I have two counters set up, one for dealers games won and the second one for players games won which both add up the results and displays them in a text box. I have another form made to display Statistics, for both 'This Session' and 'Overall', but how do I save the Overall score??

[Code]...

View 1 Replies

Using Blackjack Starter Kit For Poker Game?

Jul 7, 2009

I'm sitting here with a print out of the class deck, class hand, and cardgameframework from the blackjack starter kit for visual basic and I'm lost as to where I need to go to use the above mentioned classes. I am looking to create a simple poker game using these classes as a base. I'm not looking for anything fancy, just something functional. Starting off I would like to hit a deal button and have it deal 5 cards into pictureboxes and then give me an option to (mouse click) hold any number from 0 to 5. Once I have clicked the cards to hold, I would like the program to deal new cards into the other pictureboxes. If I could get the program up to that point it would be a great place to start. Can anyone point me in the right direction? Has anyone used the cardgameframework before?

View 1 Replies

Writing A Blackjack Game Program In .net 2008?

Dec 7, 2009

I am writing a blackjack game program in vb.net 2008. The program is designed to play 6 players per game in sequence using a pre existing algorithim (basic strategy). The program will play one game at a time using all 6 players or can be set to play 100 games using all six players and then capture the resulting data generated from each player from every card. When one game at a time is played the program works fine. When the program plays 100 games at a time it drops (loses) the data that is being stored in its string variable arrays.

View 1 Replies

VS 2005 Make A Light Version Of A Blackjack Game?

Mar 11, 2010

I'm trying to make a light version of a Blackjack game. The rules I need to use are as follows:

Ace = 1
Normal Cards = 2-10
Color Cards (king, queen, etc,) = 11

The dealer can keep hitting until it reaches 17 or under 21, he must always stay once it hits 17 or over (without busting obviously).

I know the ace normally should be 1 or 11 normally but I don't want to complicate things, I want to get the main thing of the program working first.

Public Class frmMain
'declaration to help generate number
Dim RandomClass As New Random()

[code]....

View 10 Replies

Game Programming :: Transparant Images - Make A Game Which Basiclly Lets You Shoot Ducks

Feb 1, 2010

I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.

My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.

Below is an image to illistrate my problem

I have tried adding transparent background, transparant key etc

View 2 Replies

Load Game Images Without A Picturebox?

May 31, 2010

How do I load game images without a picturebox? (like in a game)I need them to be movible with the arrow keys. I am using a windows form, in VB 2008 express.

View 7 Replies

Game Programming :: Paint Images Asynchronously Using A Background Worker

Dec 15, 2010

All my paint calls are under OnPaint event of the form. my game is getting laggy so i was wondering if theres a way to paint images asynchronously using a background worker.

View 8 Replies

Deck Of Cards- Blackjack?

Mar 1, 2009

new to programming and I was wondering how would I make a deck of cards for a blackjack program? I would post some code but I don't know where to start

View 3 Replies

Make A Blackjack Program - Execute A Different Piece Of Code Each Time A Button Is Pressed By The User?

Nov 22, 2010

I am trying to make a blackjack program and I need to execute a different piece of code each time a button is pressed by the user.

View 5 Replies

Game Programming :: Make A Game In VB In Which Character Can Move Around, Jump, And Kill Things?

Apr 2, 2008

im trying to make a game in visual basic in which your character can move around, jump, and kill things. I can get the picture box with the character to move and everything is fine. but i did run into one problem. when the character moves over a tree (or something) you can see the gray backround of the character as i made in paint. how do i make the backround of the picturebox transparent?

View 4 Replies

VS 2010 Game Multi-Client - Program That Enables A Game To Have More Than One Instance Running

Nov 18, 2011

I want to make a program that enables a game to have more than one instance running, where it would otherwise be unable to be done. How should I go about this? A sandbox? Hack?

View 3 Replies

Game Programming :: Adding Score To Rock Paper Scissor Game?

Oct 3, 2011

Im new to VB. how do I get to add the score.my code is

[Code]...

View 6 Replies

Repeat Cards Showing Up In Game And Win Evaluating Code For Poker Game?

Jul 2, 2009

I am working on a poker game and I have the game setup the way I want it in terms of graphics and I have the code programed to deal the cards out exactly how I want them. Granted, the code is very simplistic, but functional for a new programmer like myself. I'm sure there are other more efficient ways to code my game, but I like mine so far because I can at least understand the majority of it. With that being said, here are a few problems and questions that I have.

1. How come when all 12 cards are dealt out I have some cards repeating in the game? For example, I get queen of diamonds in more than one picture box when I only want the card to be dealt once and then removed until the next game.

2. I was hoping to have a button 3 to clear all the boxes, basically resetting the game to the next game. When I hit button 3 it only clears the contents of picturebox 10 and 12.Other notes: I have the deal down the way I want it. It deals the first 10 picture boxes and a second button deals the 11 and 12 picture boxes.

3. I know this is my next step so I want to post it with the code I currently have. I want to start taking my project one step further by evalutating each of the three rows of cards (3 rows of 3 cards each - I'm not worried about the dealers hand (picture box 10, 11, 12 yet). So I want to evaluate a row of pictureboxes against a "pay scale" and display the win in a text box or label next to the 3 card hand. For example, Q of diamonds, Q of Clubs, Q of spades would win 15, etc. ( have a weird feeling I may have to change the names of the cards (I have them named card1, card2, etc. right now) to something that identifies them in order to evaluate the hands.

Here is the code that I currently have. I'm using visual basic.

Public Class Form1
Dim Rndm As New Random
Dim myPB(11) As PictureBox
Dim HiddenCards As New List(Of String)

[code]....

View 1 Replies

Game Programming :: Prevent Users Typing In Random Letters In A Text Box-Scrabble Game?

May 4, 2011

I have created a scrabble game that generates random letters. For the user to type in a word using the random letters they have to type it in a text box.

I want my program to prevent users from typing in letters that are not provided in the text box and to allow them to type in the random letters that are provided.

View 4 Replies

Game Programming :: Spinning Reel - Fruit Machine Game For Windows Mobile Device

Feb 16, 2011

I'm trying to make a simple fruit machine game for windows mobile device.

I can create the game easily enough and flip through pictures in a picture box to display the correct symbol.. but what I'd like to do is do a proper spinning reel, but have no idea where to even start.

What I have is a list of images in an imagelist (or individual files) - what I'd like is them attached to each other and moving downwards, preferably as though it were going around a drum but just them moving would be a start.

View 7 Replies

Game Programming :: Pig Dice Game - When Program Runs - Never Goes To Computer's Turn And Does Not Update Users Score Either

Apr 18, 2012

On programming assignment without having any real experience in vb. I guess I don't understand subroutines that well. When the program runs it never goes to the computer's turn and does not update the users score either. This assignment is already in but would like to know what is going wrong. Using VB 2010, and this is windows application.

Code:
Public Class Form1
Dim Myturn As Integer
Dim Computerturn As Integer

[CODE]...

View 6 Replies

2D Platform Game Physics - Game Development | Dream.In.Code?

Mar 11, 2010

I'm trying to make a 2D platform game and I'm pretty inexperienced at programming. I've coded the player to move left and right and jump, but I can't figure out how to prevent multiple jumps while the player is in the air. Anyone know how to do this?

View 8 Replies

Game Of 21 Card Game, Code For Checking Score Is Not Working?

Jan 13, 2012

Check Score: The winner is the one with the highest score less than or equal to 21If both scores(player total and computer total) are over 21, or if both are equal but under 21, the game is declared a draw.

There is something wrong with this line:
If intPlayerCardTotal < intScore And intComputerTotal < intScore Then
MsgBox "Draw"

[code]......

View 6 Replies

Game Programming :: Changing Field Size A Game Should Restart

Apr 30, 2011

Upon changing the field size a game should restart. Upon trying to do so I see the previous grid (e.g. 10x10) displayed on top of the new one (e.g. 4x4). How would I prevent this and indeed start the game fresh?

View 10 Replies

Game Programming :: Game With Jumping While Moving And Sensing Colour

Feb 4, 2011

So here is my problem. I have a vb game with animated sprites and all, and the character even jumps. However it only works in the y direction. So if i'm moving, he stops in place and jumps, instead of jumping forward. I was wondering if someone knew how to make him move at the same speed forward during the jump.

[Code]...

View 2 Replies

Game Programming :: High Score List For A Who Wants To Be A Millionaire Game?

Apr 19, 2011

I currently have a who wants to be a millionaire game that I have made in visual basic 2010. Each question is in its own form. Form1 opens at the start, and question 1 is opened by a button click on Form1. The user has to click on the picture box at the side to show the text for the question each time. If they answer incorrectly, it displays a message box, opens an input box asking for their name, and goes to the form with the high score list, Form17.

Upon opening Form17, I want the scores to load and be displayed in the list box. The high scores are saved in a text file at C: est.txt . Upon clicking menu or end, the high scores are saved to the text file.

View 2 Replies

Game Programming :: Writing A Video Poker Style Game ?

Apr 1, 2009

I m writing a video poker style game. the form consists of the player's 5 cards, a deal button, a hold button for each card, a button to select amount to play that hand. im using Visual Basic 2008 Express Edition.

View 10 Replies

Projectile Motion - Make A Game Similar To The Impossible Game?

May 19, 2011

I'm doing a project for school. I'm trying to make a game similar to the Impossible game. I need a square (picturebox) to jump but I want gravity to effect it.

View 1 Replies

Game Programming :: Code For 3 Of A Kind In Yahtzee Game

Apr 18, 2010

im struggling to work out the code for 3 of a kind in my yahtzee game, i think that if i can work this out i can sort my everest of the full house code!

can someone tell me where ive gone astray?

code:

View 8 Replies

Game Programming :: Create A Picture Shuffle Game?

Jun 4, 2012

I am all new to Visual Basic 2008, I am trying to create a picture shuffle game, the problem is I cant seem to be able to move one picture from PictureBox1 to PictureBox2 onClick, here is a Code I written earlier:Sub ChangePicture(ByRef P1 As PictureBox, ByRef P2 As PictureBox)

[Code]...

View 1 Replies







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