i am trying to create computer guessing game for my college. computer guess my number like i have random number in my head for example 45 then the first computer guess is 50 then i tell the computer that is too high then the next guess is 25 then i click low then it goes on i cant figure out how to make it run it like when i click on high it supose to get the number low then when i click on low then it suspose to go low but it doesnt.
Public Class frmMain
Dim IntLowestNum As Integer = 1
Dim intHighestNum As Integer = 100
Dim Count As Integer = 0
Looking for a bit of help here. I know my If...Then...ElseIf statement is somehow off, but not sure how. Could someone point me in the right direction? I know I am almost there but need a nudge in the right direction.
i'm creating a game for a college assignment based on Yahtzee, and so far everythings going smoothly but i've run into a hitch! Basically, after each roll of the dice i want to be able to retrieve the number of the dice wich apeared in each picture box. But how would i go around retrieving that type of data from a picturebox?
im making a random number guessing game type thing, i have the main thing done, but I was just wondering, how could I get it to show the integer rndnumber in the message box that comes up? I think its something like &= or something, but I havn't even been using VB for a week, so im can't figure it out. Here is my script:
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If RadioButton1.Checked = True Then[code]......
I'm creating a number guessing game. [Code] Textbox1.text refers to the answer input by player. There are two labels for displaying the range of the answer within. Label1 and Label2 refer to the lower limit and higher limit respectively. If the input value is smaller than the answer, the label1 will show the number that input into texybox1. If the input value is larger than the answer, then vice-versa. However, the program doesn't work as my expectation. Once I input the answer, the MsgBox doesn't appear. When the input value is smaller than the answer, the label1 doesn't show the input value.
I have written this code for my class. I just can't figure out what is wrong with it. What the program does is set a random number in memory then a guessing box input tells if it is too high or too low or correct. I set it up so the min and max numbers can be changed. What am I doing wrong. You don't even have to tell me the code I just want to get it working
Public Class Form1 Dim randomObject As New Random() Dim random As Integer
I am attempting to create a game in Visual Studio 2008 that allows a user 10 attempts to guess a random number between 1 and 50. I have a label box in which I would like to display the remaining guesses as they decrement. The code so far appears below.
My two (I am sure very basic) questions are:
1. How would I pass the random integer generated through the Generate Integer function to the AmIRight button's click function? I was trying to decrement the counter each time the "Am I Right " button is pressed.
2. I would also like to evaluate each "guess" when the "Am I right button is pressed. Is it possible to nest a Select Case statement in a For Next Loop?
vb.net Option Explicit OnOption Strict OnOption Infer Off Public Class frmMain Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub txtGuess_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles
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
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)
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.
I have to create an online application which i can apply it on every employee's computer in my company and i have create the application on visual basic 2008 and SQL 2005 using windows application and database. The problem is i do not understand how am i going to run the application on every employee's conputer. Because i have create the application on my computer, must i install SQL on every employee's computer? or any other software i have to used.
I have to create a game in which I pick a number and the computer or program tries to guess it. I have a general idea of how to make it the other way around, where the computer picks a number and i guess it but does anybody know how i would begin to do it this way? where the computer has to guess a number that i've chosen?
Whilst developing a game (for the PocketPC, but it also works on a PC) I have created a function which should act as the move the computer, as oponent player, should make. The game-grid is build as a variable square of 'buttons' and the computer does calculate the correct 'button' to select. My problem now is how to implement this into the code correctly.
I was thinking about making an interactive computer survival game, such as the Rainbow Survival levels in Little Big Planet. I was wondering if there was a tool i could use to create the objects, such as the character, explosives, bombs, and point bubbles. i know how to make all the objects move, i just don't know how to create them to begin with, is there a certain tool in Visual Basic 2008 i could use?
To programming and have a question with sound files. I am trying to figure out the basics and here is what I did: I created a button that is supposed to play a sound.
My.Computer.Audio.Play("C:.......file.wav")
When I click this button in my .exe file it obviously plays because I am using the computer with the above location for the .wav file. When I use the .exe on another computer it doesn't play because it does not recognize that .wav location. How do I make this work for me? Do I need to embed the .wav with my .exe somehow?
Option Explicit On Option Strict On Option Infer Off Public Class mainForm Private Guess As Integer Private Number As Integer
Private Sub exitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitBtn.Click Me.Close()
[Code]...
what is wrong with this code, if possible please give me some directions or navigations so that I will try to think and fix my issue due to the fact that i'm a student and trying to do an assignment.
I'm creating a database program for my final graduate at college. But I was stuck when I opened my solution, my visual studio it always crash and crash and crash..
My project it's using SQL Compact Database, 8 Project (6 Visual Basic, 2 Visual C++), using .NET Framework 3.5.A project in VB is 6 Windows Forms (Single App and MDI App), Class Library and C++ just Library.
What must I do now? Where can I fix my project? At least I can build the relase or installer of my project..
It's wrong to include all of project in one solution?
How would you make a text box that guessed what you were about to type?...Don't understand what I mean?...for example, look at the Google search box...when you start typing stuff there, previous searches pops up underneath right? How would you make one of those? Would you need a text box to type things in and then a list box that pops up? All the info that pops up is in a database.
I'm trying to create a basic mmo game for fun in vb.net. I have done it before with a game api but I'm recently reformat my computer and can no longer find it. I'm trying to dynamically create a new picture box that will be my character or NPC and I can get the image to show up on the screen correctly but I'm not able to use "myGuy" anywhere else in the project. So the character basically sits there and does nothing. I'm wondering if there is away to call "myGuy" (myGuy.Top = 40) in another sub? If you know of a good game api that is not a hog and not expensive let me know.
I spend my spare time trying to create a football game in VB.NET. I have a save game file saved using serialization which I am using to test code. This file contains all the elements of gameplay (stored plays, games, options, etc...) I create this file in the software itself using the code I created; I put a lot of work into this save game file and I would like to continue using it.
However, I discovered I need to add a couple member variables to the class from which the saved object is derived (object is called m_League, class is ClLeague). Any time I've altered ClLeague my old saved games don't load anymore because the new m_League object does not match the old m_League object. I have to start a new game and create m_League from scratch which wastes a lot of time.
This must pop up in with the professionals out there who write patches for software and need the users old saved files to continue working. Is there any trick to this situation or do I have to just accept it?
I am a noob to Visual Basic and I am currently learning it at my college. I have a final project to do and I am having some trouble deciding on how to attack it. First off, I have done a lot of research and I cannot find my answer, so I am using this(post) as a last resort. The book my prof is having me use is outdated, its coding on vb6, and we are using vb2010...hence my problem. I am not looking for an answer in code, but more to be pointed in the right direction, or maybe some classes that I do not know about.[code]...
I am building a quiz application in .net just like on flash mini games, is this possible in .net? and what is the easiest way to create this? make moving objects, cartoon interface and etc. also, it is supposed to be a standalone application.
how can i create a scoring for system for my Maths quiz game made using VB.My quiz game can generate automatic numbers / questions and shows a message box whenever the user gets the answer right or wrong. i.e.when the user presses the check answer button, a message appears stating that he/she go it right or wrong. Then the user can press the next question button to get a new question.
I am trying to create a game using vb but don't know how to create a "save game" function. I was told something about saving to files but don't really understand it.