Asking For Players Names

Jun 3, 2011

I am creating a Yahtzee game, the first thing I want my game to do when it loads is ask for the player/players name/names, so that there scores can be saved to a high scores table.I have decided to add a text file to my project as a start and I was thinking of using an array to add the score for the winner at the end of each game.I am stuggling on how to really start this though. I have come up with an idea, I could do with some advise as to weather my idea is any good.First thing, I need to add a text file and call it something like HighScores..Then I need to add a Windows Form to my project and add some controls for the user/users to fill in there name/names..How can I get my Windows Form for the players names to load when the application is started, do I use a form load event???

View 2 Replies


ADVERTISEMENT

Ordering Number Of Players In Game?

Dec 29, 2011

I decided to take up the task of writing an app for Dungeons and Dragons. I play with my friends and I'm trying to make it a little bit easier.Before every round of combat players roll dice for Initiative. It basically tells the games manager who goes first and in what order the rest of the players go. When players roll for initiative they roll 20 sided dice. On Form1 I have a button that says "Initiative" which opens another window where the manager would type in each players values. Then I want the program to take those values and order the players from highest to lowest in a list on Form1. Kind of like...

John 32
Frank 29
Tom 25
Bob 15
Ralph 5

View 4 Replies

Create A Validator That Checks To See That If Both Players Have Entered A Nickname?

Jun 7, 2012

First of all I'm trying to create a validator that checks to see that if both players have entered a nickname. If they don't then it should automatically close the form but instead the application hangs. If the first player uses three tries then it "should" automatically close. Here it is:

Sub getNickNames(ByVal Players() As String)
erCount)
'Force Select Username. If More Than 3 Attempts Are Made The Game Will Exit To The Main Menu

[code]....

View 3 Replies

Make A 2 Player Game But Both Players Can't Move At Once Unless They Tap The Keys?

Aug 20, 2009

Well I am trying to make a 2 player game but both players can't move at once unless they tap the keys (can't hold the key down or the other person can't move). How would I fix this as well as being able to go diagonally.Would this work?:Declare a bool value for each keypress below the public class thingy. Then use keyup to turn the bool off and keydown makes it go on. Then for the first player and second player I check if they are on and if they are than go to that direction...I think I would need a timer for that part but I dunno...

View 3 Replies

Make A Continue Button Where The Players Progress Is Already Saved?

May 3, 2012

I'm planning on creating a game on visual basic where the player goes through multiple levels to be able to clock the game, sort of like in the game 'Dooooooors'. How do I make a continue button where the players progress is already saved? What is the code? Would I be able to make it so that the gamer can only access the levels that they have completed, they can't play the unlocked levels yet.

View 2 Replies

VS 2010 - Cant Read More Then The First Line Of The Players Text File?

Jul 1, 2010

im making a game that reads text files off of an ftp server. everything is working great. except for the fact that i cant read more then the first line of the players text file. how would i use substring to, for example, look for 'inventory' and get all the info under 'inventory' and above the next title?

View 1 Replies

Game Programming :: Snakes And Ladders - Get The Picturebox3 Which Is The Players Counter

Oct 26, 2009

Ive been working on this for ages now i am supposed to b doing it in c# part i find it impossible so im doing it in Visual Basics

This is my current code atm:

Code:
Public Class Form1
Dim n As Integer
Dim oney As Integer

[CODE]...

Now i have the dice working and all that, the proplem is that to get the picturebox3 which is the players counter, if i do it the way im doing it atm its gonna take ages there must b a quicker way, i am thinking that arrays is suming i should use but im not that familier with them, i tryed this code using arrays:

Code:
bored(0) = PictureBox3.Location = New Point(210, 476)
bored(1) = PictureBox3.Location = New Point(270, 476)
bored(2) = PictureBox3.Location = New Point(320, 476)

[CODE]...

But when i tried clicking button 2 it didnt show the picture box at the right location it showed it at 0,0

View 10 Replies

Make A Slider That Corresponds To The Normal Sliders In Video Players?

Jun 9, 2011

I have got a very simple video player wrote using Visual Basic 2010. I have embedded the windows media player into the app without the controls. Right now it has simple play, pause and open buttons that work with wmp . how to make a slider that corresponds to the normal sliders in video Players?

View 3 Replies

Set The Column Names To The Same Values As Table Names Yet The Data Is Not Showing In Form Load?

Aug 15, 2011

I have a DataGridView which populates from an SQL query just fine in default mode

using these table names
[firstName] [varchar](20) NOT NULL,
[lastName] [varchar](20) NOT NULL,

[code]....

I have edited the column headers and set the column names to the same values as my table names yet the data is not showing in form load I have set datagridview.AutoGenerateColumns = False I know the data is there if I delete datagridview.AutoGenerateColumns = False then the data is shown with the default headings?

View 3 Replies

Reload Form Again To Read New Texts Names And Mainmenu Items Names From Resx File?

Nov 9, 2005

I made project using VB.Net 2005 with multi languages, the first form is MDIParent form with MainMenu and toolbars also there is some changes in properties as righttoleft and text of forms.In my Mainmenu (Menustrip) there is opetion to change the UI Culture and I have already done but I need to change all texts in the form as mainmenu items anf form properties.My quetion is: how can I reload my form again to read the new texts names and mainmenu items names from resx file?

View 8 Replies

C# - Decompiling .Net Assembly Produces Code With Invalid Member Variable Names; Names Starting With $STATIC$?

Sep 5, 2011

I am doing work for a client who has lost the source code for one of their VB.Net WinForms applications. The assembly they have is not obfuscated at all. I am trying to recover as much of the source as I can as C# source and have tried several tools for decompiling assemblies, including Reflector, ILSpy and JustDecompile (all the latest versions), but they all produce code with a huge number of errors in them. Because of the large number of errors in the generated code, I am going to ask about the specific errors (in different questions), get more directed answers and in this way try shed some light on why all the tools are having difficulty decompiling this assembly. This question pertains to the fact that the code generated by all these tools always have a large number of invalid member variables (fields) such as the following:

private short $STATIC$Report_Print$20211C1280B1$nHeight;
private ArrayList $STATIC$Report_Print$20211C1280B1$oColumnLefts;
private StaticLocalInitFlag $STATIC$Report_Print$20211C1280B1$oColumnLefts$Init;

why the generated code has these invalid member variables?

View 3 Replies

Button Names In Users Language - Get Common Control Names

Oct 31, 2010

Is there any way to get common control names like Save, Copy or Undo Redo in the user's windows language? (I saw this in some programs which weren't made for my windows language. Also the Yes No Massage Boxes will change...)

View 1 Replies

Error: "Upgrade Failed: Exception Occurred: Can't Use Character Device Names In File Names"

May 25, 2006

I am experiencing a problem when trying to convert a rather large VB6 application into a .Net 2005 application. Everytime I try to convert the project I get the following error: "Upgrade Failed: Exception occurred: Can't use character device names in file names"The weird thing is i have tried to convert the project using .Net 2003 and I do not get the error, it does convert.

View 12 Replies

Event Names In .net?

May 27, 2010

i'm using an older version of .net (1.1) and I was looking for an implementation of BackgroundWorker that I could use with it. I found one here (TALLEY OURO BLOG: Custom Backgroundworker with VB), but I have trouble understanding one part of it.The example includes this declaration

Public Event DoWork As DoWorkEventHandler

with a delegate handler and argument class. My problem is that the code contains the following line If Not (DoWorkEvent Is Nothing) Then Nowhere else in the code does the exact text

DoWorkEvent

appear, but the compiler accepts it quite happily.

View 4 Replies

Get Table Names Using ADO.NET?

Oct 23, 2009

I can;t seem to find anything that shows me hoe to get table names from an access DB using VB.NET. There is a main DB as well as tables linked from outside DBs.

View 1 Replies

UNC Share Names / How To Get Them

Jun 11, 2009

I've looked in System.IO. but I can't find anywhere to get the unc share name of a path/drive.Anyone know how to get the unc share name of a folder, i.e. 'O:MyFolder'.

View 4 Replies

Using Names In Loops?

Sep 30, 2011

Im somewhat new to VB, my first time writing a mildly long program... have a program that will create an unknown number of textboxes, then later I will need it to manipulate those textboxes. I set it up so it names them txt1, txt2, txt3 etc..How can I write a loop that will refer to each of these textboxes by name so I can do what I need with them, ie for example in

For i =1 to x
txti.text = i
next

this would make no sense...how do i write the names correctly so the computer can understate and loop them as txt1, txt2,...?

View 3 Replies

Add All Font Names To Combobox?

Jul 3, 2009

I've tried everything that I could think of to get this to work. Is it possible that anyone could help me add each system font to a combobox? I imagine it would be like[code]...

View 5 Replies

Add File Names To Listbox

Feb 11, 2009

I have a new app im making... its for a mod im making for rFactor now for ease for the testers getting updated mod files im making a download manager (i have done that bit already and it works) but what im trying to do is put a list box on the form so they can click the file/zip they need to download and click download.. now i know how to get a list of file/folders from a dir on my pc...

Dim dir As String
Me.ListBox1.Items.Clear()
Dim dirs() As String = Directory.GetDirectories("C:\")

[CODE]...

But is there a way i can do this for my webserver? i have lloked on google and cant seam to find anything.... i was going to make a auto updater and i see some source code on code project but as im still pretty new to coding i dont think im ready for it.

View 7 Replies

Add File Names To Listbox?

Feb 2, 2011

Im not grasping something here.I can populate folders in listbox's but dead in the water populating files in listbox's.

Option Explicit On
Imports System.IO
Imports System.IO.FileInfo
Private Sub ListBox5_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox5.SelectedIndexChanged

[Code]...

View 5 Replies

All Column Names In A Table?

Jun 3, 2011

i recently posted a code that i had that i needed assistance for and it was solved it was for displaying all tables in a database.but now i have this code for showing all column names in a table i was in the process of turning it from oledb to sqlclient. GetOLedbSchema can be turned to getschema but when it comes to OleDbSchemaGuid

Public Shared Function getAllColumnNames(ByVal tblname As String) As String()
Dim com As New SqlCommand
Dim con As SqlConnection

[Code].....

View 1 Replies

All Column Names In Table?

Jan 17, 2011

i have this code for showing all column names in a table i was in the process of turning it from oledb to sqlclient. GetOLedbSchema can be turned to getschema but when it comes to OleDbSchemaGuid

Public Shared Function getAllColumnNames(ByVal tblname As String) As String()
Dim com As New SqlCommand
Dim con As SqlConnection

[Code]......

View 2 Replies

Array With Object Names

Jan 30, 2010

I'm having problems regarding using arrays on object names. for example, i have a textbox named txtBox1.text and a array declared as a(2). I what to transfer the value of the textbox to the array using loop.[code]

View 2 Replies

Arrays: Names By Gender?

Mar 26, 2011

he program is using parallel arrays. The first array lists names, and the second array holds the gender of each person. "M" for males and "F" for female names, What i need the program to do is when the user click on either a Boys button and Girls button it will display the correct names into a listbox. for the love of me can not get the program to work correctly. The book, I guess, just does not give enough details

Public Class Form1
' Declare and initialize the name array
Dim strNames() As String = {"John", "Paul", "Mary", "Jane", "Peter", "Sam", "Andrew", _

[code].....

View 8 Replies

Can't Get Multiple Names In Result Box?

Apr 26, 2011

Imports System.Convert Imports Microsoft.VisualBasic.ControlChars public Class MainForm Private Property namesListBoxType As String Private Sub MainForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code]...

View 1 Replies

Cannot Post DLL Names Or The Full?

Dec 14, 2009

I am upgrading a project from VB6 to VB.NET. Due to my non disclosure agreeement I cannot post DLL names or the full code here.Here's the situation. I am making a program that works with a USB scanner. In VB6 there is this function:

vb.net Public Declare Function GetCode Lib "MyDll.dll" Alias "myAlias" _(ByVal DeviceID as Long, ByVal CodeLine as String, ByVal Length as Long) as Long So, in VB6, to get the code from the scanner, you would do this:

[Code]...

View 8 Replies

Code In VB To Sort N Names?

Mar 10, 2009

Code In VB To Sort N Names?[code]...

View 2 Replies

Column Names Are Not Permitted

Jun 18, 2012

The name "Debit" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

View 5 Replies

Concatenation Of Button Names?

May 8, 2010

I am wondering how to concatenate a string and an integer to form a button name.eg, ("button" & x) where x is an integer to form button1, button2, etc so i can change the backcolor of the buttons.

View 2 Replies

Different Excel Files Of Different Names?

Jun 6, 2011

i have 4 different excel files of different names.each excel file has 8 columns and 15 sheets.All excel files has same columns and same number of sheets (same sheet names and column names)i have to merge these 4 files into one.that file must be identical to the individual files.i.e same column names,and same number of sheets.

View 12 Replies







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