Create A Form That Displays Rules Of Game On Label

May 10, 2011

I am having trouble with my code for Guess my number. I am definitely amatuer. Yes it is a homework assignment. No I am not asking you to do it for me. But I am stuck.Your GUI program is a game to be played by the user. See Screen Shot on Screen Shot Tab..A new employee is working on a classified mission and the program will randomly pick an expected profit to be guessed by the user.The program must randomly select an number within the range of 1 to 900.Do NOT use a 'Start Game' button to generate the rand number. Generate a rand number when the GUI is loaded.

1. Create a form that displays the rules of the game on a label.
2. Create a textbox for the user to input the guess and also a 'guess' button.
3. If the user is outside the given range, provide a proper message (<1 Is not a valid guess or >900 is not a valid guess)and clear the guess.
4. When a user has a valid guess, display a proper message (either too high or too low) and tell the user to guess again.
5. With a correct guess, display a proper message and change the form's background color to red and disable the guess textbox.
6. Create a reset button that allows the user to play the another game with a new random number.
7. Create a show me button that displays the number and does not generate another random number (allow the current game to continue).
8. Create a exit button to exit the program.
9. Ensure that you include error checking to prevent a user guess that is out of the given range and for any non-numeric characters.
10. Create a single Help menu item that launches a message box that displays valuable and meaningful information for the program and usage.
11. Create a label that tracks the guess count per game. Each time a new number is generated, start the guess count at 0.
12. Create a max guess limit set to 5 and use a progress bar to track the progress to approach the limit.
13. After each valid guess (1-900), clear the guess and update a label/textbox that displays all of the previous guesses up to 5 entries.

Here is my code so far. I have been working on one point at a time and then testing it. I have not even made it to numbers 11 - 13. I am not getting actual errors. Instead of my reset button clearing all fields at once I am having to click it more than once. Instead of displaying messages per scenario the message label is staying on either input a number or your number is too low. My Answer is not displaying when Show answer is clicked-perhaps my answer coding is wrong? [code]

View 14 Replies


ADVERTISEMENT

Displays Text Into Label At Next Form?

Feb 24, 2011

I have two forms (form1,form2). Now I have button in form1 that executes to display text into label1 at form2. How to call it? Do I need to have module for this?

View 5 Replies

Hangman Game / Automatically Displays Character And Gives A Game Over?

May 8, 2009

I am a student working on the venerable "Hangman" project. We were tasked to create a hangman game that would get a random word from one of three sources either by file, by array, or by database file. I have managed to get a random word to import from all three but I run into a problem once I start to play the game. The program seems to run into an infitinite loop as soon as you enter a letter or it automatically dispays character entered and gives a game over. [code]............

View 39 Replies

Task: Create And Display New Password Using Rules

Nov 24, 2011

Rules:

Rule 1: Replace all of the vowels (A, E, I, O or U) in the original password with a number as follows: (20 points) Replace the first vowel with the number of 1. Replace the second vowel with the number of 2. Replace all other vowels with the number of 9.

Rule 2: Replace all of the numbers in the original password with the letter Z. (15 points)

Rule 3: Reverse all of the characters in the original password. (10 points)

Rule 4: The enter password should be non case-sensitive. All the letters in new password should be in upper-case. (5 points)

This is what is should look like:

My code:

CODE:

Right now I'm not worried about the efficiency of the code (i.e. simplifying code into fewer lines). The problem I am having is the locating and replacing of the vowels. When running the program the code will replace all of the numbers with "Z", reverse the string, and make all letters uppercase. When it comes to locating the vowels, the program squares the number it goes through the string by the number of letters that it contains. I don't know why it does this.

when the string contains more then 1 vowel the first time it goes through it replaces all vowels with 1, then goes through again and replaces all vowels with 2, and goes through again repalcing all vowels with 9. These are all then combined into one string.

The research I have done has only turned up how to replace vowels with one thing (i.e. all vowels become "*")

View 1 Replies

Create A Set Of Grammar Rules For Speech Recognition Program With An Array

Jun 15, 2012

I have been trying to create a set of grammar rules for a speech recognition program with an array, but cannot seem to accomplish this task. Here is the general idea:[code]But this did not work, because I cannot convert strings into srgsoneof.

View 18 Replies

Create "a Windows Form Game Called Yahtzis Which Uses Five Dice And Three Throws To Create A Score"?

Oct 18, 2010

i am suppose to create "a windows form game called Yahtzis which uses five dice and three throws to create a score" .

The problem is that i don't even know how to start it can anyone shed some light.

View 2 Replies

Adding A Label To Listbox No Title/name Displays?

Jul 13, 2010

Pretty basic problem here. Nothing shows up in my listbox at runtime when I add these labels. Dim lblPerson As Label = New Label() lblPerson.Name = "Person" & Master.People.Count + 1 I even tried overriding the ToString() function of the label class as to return Me.Name:

[Code]...

View 9 Replies

Asp.net Textbox According To The Digit Displays In Label Text?

Nov 18, 2010

If in the label the default text is 10 then ten textbox controls will be generated in webform ...

View 1 Replies

Create A Game When Move A Picture Box Around The Form With A Timer Control?

Dec 17, 2009

i am try to create a game when i move a picture box around my form with a timer control i almost done every thing but the problem is avoiding the flikkering effect ?is there any way to avoid it?

View 6 Replies

Design A Highscore Board That Displays Scores Based On The Label?

Aug 20, 2011

I am trying to design a highscore board that displays scores in order based on the label (after countdown timer) from another form.i want it to ask the player's name and automatically assign the name to the score and stay together even when being shifted (eg when a new score appears)currently i have designed a form to display in order, numbers typed into a text box.this is my coding so far

Public Class Form1
Dim lstInt As New List(Of Integer)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load[code]....

View 11 Replies

Create And Display A Label On A Form At Runtime?

Jun 25, 2010

I have created a label to display on my form at runtime but it doesn't show up. I know I am doing something really dumb.

Dim
lblLoad As
New Label

[code]....

View 2 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

Game Programming :: Create A Zombie Style RPG Game

Sep 11, 2009

Is there any visual basic 2005/2008 RPG games with the source code available for download.Could you possibly reply to this post with a link to the website with the game.Or is there a template i could use to try create a zombie style RPG game text or graphical.

View 2 Replies

Create A Button Or Label That Is On A Form That Has Also Been Created Programmatically

Sep 11, 2009

I have code that refers to controls like buttons and labels and textboxes (obviously), but i want to create them programatically, how can i create a button or label that is on a form that has also been created programatically. Here is what i have:

Dim frmIndashone As Windows.Forms.Form
Dim vscPage As Windows.Forms.ScrollBar
Dim lblPageNum As Windows.Forms.Label
Dim txtVector As Windows.Forms.TextBox
Dim txtPageCode As Windows.Forms.TextBox

I am asking because i have a With statement that assigns different values to the different things that looks like this below:

RaiseEvent Load(frmIndashone)
With frmIndashone
.vscPage.min = 1

[code]....

But i am told on everyline of the second snippet that vdcPage, lblPageNum, txtVector and txtPageCode are not members of windows.Forms.Form, How can i make them members?

View 6 Replies

VS 2008 : Create A Specific Area To Drag Form (ie: Image, Label)?

Sep 13, 2009

how to create a specific area to drag my form (ie: image, label). I found some code that works, however you can click anywhere and have it drag...

Const WM_NCHITTEST As Integer = &H84
Const HTCLIENT As Integer = &H1
Const HTCAPTION As Integer = &H2

[code]....

View 4 Replies

Create A WinForm App That Just Displays A NotifyIcon?

Apr 16, 2009

I created a new WinForm application then dragged a notify icon onto my designer. I coded my desired functionality for the NotifyIcon's behavior inside the Form1.vb file.I think I remember something about adding a module to the project, and setting the project to launch the aforementioned module instead of the form...but I can't figure out/recall how to keep the functionality I've coded into Form1.vb.

View 1 Replies

Game Programming :: High Low Game - Entering A Name On My First Form ?

Jun 10, 2012

So I pretty much built the game, that was the easy part. I am having trouble entering a name on my first form(startup) and keeping track of the score on second form(game) and displaying it both combined on the first page with the current users score. Also the way it set up now if you are running the game for the first time it says can't find LowScores.Text. Start Up

CODE:

CODE:

View 6 Replies

DB/Reporting :: SQL Select Query In Form - Form With A Datagridview That Displays All Of The Values

Mar 26, 2008

I am using VB2008 Express and a MSSQL Server 2005 db by the way! I have a comprehensive SQL statement, which should fill my Grid:

DECLARE @Sum NUMERIC(9,2)
SELECT @Sum = SUM(I_LS.lmenge)
FROM dbo.lfs AS I_L

[CODE]...

Now here is my problem! I want to have a form with a datagridview that displays all of the values I am querying. This shouldn't be a problem I guess. However, I have no idea how I can integrate two textboxes that can be used to enter the selection criteria (WHERE I_L.lfsnr LIKE '%1253') AND (l.sped_journal = '11-08')[/SIZE]. I have googled and read many threads so far but didn't stumble upon anything that would suit my needs and answer my question. Maybe it's just too elementary!? By the way, it is very important that the input of textbox1 ((WHERE I_L.lfsnr LIKE '%1253')) is linked to 3 positions in my SQL query to define the search criteria!

The worst thing is that I don't want to have a bindingnav displayed! I do not need any delete, update or add functions just the select option, however!

View 1 Replies

Create A Menu Interface Which Displays All The Items

Dec 17, 2010

I'm creating a program for school coursework which serves as an online ordering system for a local carry-out. I need to create a menu interface which displays all the items, where the user clicks on their choice, enters the quantity desired and then its added to a list box.

[Code]...

View 2 Replies

Create A Program For A CD That Displays A List Of Files That Are Also On The CD?

Mar 10, 2011

I'm using Visual Studio 2010 Express Edition - Visual Basic.I'm very new to VB but I would like to create a program / splash screen that displays a list of files (Word, Excel, Project) that are located on a CD. I'm not sure how to start other than starting out creating a new project.

Here is how I would like the program to work. The user inserts a CD-rom (containing the program and a folder with all the files) the program automatically starts up when the CD is inserted and it displays a list of all the files on the CD. The user can click any of the files to start the program that created it. Example, if we have an Excel file called "Work Schedule", the user could click it and it would open in Excel.

After I've created the project and have a form, I'm not sure what tools I need to use to display the list of files.I'm not sure how I set up the connection (path) between the program and the folder containing all files, especially as they will all eventually be located on the same CD.

View 2 Replies

Unable To Place A Label Box In The MDI Parent Form And Then Open A Child Form The Label Box Highlighted In Child Form?

Dec 15, 2011

I have an issue when I place a label box in the MDI Parent form and then open a child form the label box highlighted in child form?

View 6 Replies

Create A Program That Displays The Height Of 3 Different People Via A Scrollbar?

Oct 31, 2010

I have been asked to create a program that displays the height of 3 diffrent people via a scrollbar. The problem i'm having is i don't know the code for getting the total from the scrollbar to display on the height labels .The labels are named lblheight1 lblheight2 lblheight3 Scrollbar is named vscheighttotal?

View 5 Replies

Create An Application That Calculates And Displays A Customers Bill?

Apr 21, 2010

Using VB2008 I need to create an application that calculates and displays a customers bill.Business customers must have one connection.

Heres the data

Residential customers:
Processing fee: $4.50
Basic service fee: $30
Premium channels: $5 per channel

[code]....

View 8 Replies

Create Program That Adds The Whole Numbers From 1 To 1000 And Displays?

Feb 2, 2011

I have to create program that adds the whole numbers from 1 to 1000 and displays the sum in the label. Create a variation of this program that allows the user to specify any starting whole number and any ending whole number (10,000 or lower) and then adds all the whole numbers in that range. Allow for the possibility that a user may start with a high number and end with a low number. Format the label so that commas are displayed and there are no decimal places showing. I need help with the codes.

View 5 Replies

Create A Program That Displays An Image When Press The Start Button?

Jun 5, 2011

program a little begginner project. So I want to create a program that displays an image when you press the start button. When you press the "Next button" it will display a new image.My problem is, I want the image to change EVERY time you hit the next button.

[URL]

View 3 Replies

Create A Simple Page That Displays Information From VB Programs Variables?

Apr 13, 2011

I have created a program that takes a users input of a bunch of fields. Now what i want to do is create a word document using the information that was entered so users can print a page with the information and save it as well.

View 1 Replies

Tic Tac Toe Game - Place At Random An X Or An O In An Empty Label?

Nov 12, 2009

A fiend of mine and myself are working on a simple game of tic tac toe and we can't for the life of us figure out the computer part. Can you guys help?

What we want to know is, if the label has X or O in it and therefore is occupied then the computer should place at random an X or an O in an empty label.

View 9 Replies

Game Programming :: Display In A Label The Appropriate Number Of Dashes?

Oct 12, 2004

I trying to display in a label the appropriate number of dashes based on the number of letters in a word that the first player entered.

Basically, when you click play, the first person enters a word, then the second player guesses what it is. That person has 2x #ofletters of incorrect tries. I just need to figure out how to get the dashes to display based on # of letters and not a preset one of 5 dashes. The original program accepts only 5-letter word so that line of code is Me.lblWord.Text = "-----". I have modified it so the user can enter any # of chars. I tried making the above line with a lot of dashes so it but the leftover dashes will stay there and the game won't end. Here is what i have right now for my play button:

Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlay.Click
'simulates the Hangman game

[Code]....

View 5 Replies

VS 2005 Form Only Displays Some Part If Tried On A Different System

Sep 2, 2009

I have a laptop with vista and desktop with win xp. I am building the application on win vista but when i copy the same project and view it on win xp , then it only shows the fields that fits on the screen. the rest of the fields that needed to be scrolled on right , does not come at all. The project works fine on win vista. I even tried to tried publishing the project. it works fine on win vista but is missing some fields on win xp.

View 9 Replies

Lotto Game Mouse Hover Wait To Display Label After All 6 Boxes Have Been Hovered?

Feb 21, 2010

I have a slight issue on my program. I have everything in working order except for displaying "You Win!" or "Try Again!" after all text boxes have been hovered. Currently it displays the answer on the first hover because all boxes are already populated with random numbers from an Array and it knows the answer. I want the label to display at the end of the game on the last hover event.

Public Class Form1
'Declare variables we want to use on more than one sub or function.
Private randObj As New Random(1)
Private LottoArray(5) As Integer

[code]....

View 2 Replies







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