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]....
I am trying to create a high scores board - currently i was experimenting with just typing a number into a textbox and having it automatically order the numbers (in labels) from largest to smallest however i cannot get them all to work. either just the first and second (label) works or the second and third display the same number or the second decreases in value even though it shouldn't[code]...
I am trying to make a turn-based board game that will be run on multiple computers. I am writing the game logic and design in VB. I searched for a little and could not find the information I was looking for. One question I have is, will I need a server if there will only be 2 players. Also, what language should I use to write the server side code.
I need someone with patience and can go through a solution with me from the Clearly Visual Basic book. I'm good with computers and can usually learn things relatively fast on my own time and in my own way, but I'm going to school for computer programming and, with certain things, I learn better with things explained to me rather than reading from a book. If someone has the time to go over this solution I'm doing and explain it to me in a way I'd have a better chance of understanding, I'd be truly grateful. I need a tutor, for lack of a better word. The lab I'm doing is from the Clearly Visual Basic book and the instructions are:
Code an application that displays a letter grade based on the averages of three test scores. Code the application using a function to determine and return the letter grade. If the average is at least 90, the grade is A. If the average is at least 80 but less than 90, the grade is B. If the average is at least 70 but less than 80 the grade is C. If the average is at least 60 but less than 70, the grade is D. If the average is below 60, the grade is F.
the rules are that same coloured blocks of two or more can be removed by clicking on them. blocks then slide down from above. if a column is empty columns other columns move in from the sides.when someone clicks on the green blocks in the bottom row the columns should slide in from the sides. columns to the left of the black line slide right and on the right of the black line slide left. so in this case only the two rightmost columns should slide from the right to the black line after removing the green blocks.The problem i am having is in designing a suitable algorihm to do the collapsing after the removal. my current approach is to test each column from left to right to see if it is empty. if it is empty then i slide whatever column is to the left (if left of the black line) or to the right (if to the right of the black line) over the blank column and repeat this in the direct i am sliding from
I'm making a Pong game and currently when the game ends the scores are show in a lable and a message box pops up saying which of the two players won.
However the problem i am having is i want it so that the player who won has their score saved to a database so i need to know how to get the score from the Lable to save to the database but then also have a way possibly a message box ? where the player can input the desired username. so the database would have two collums username and score where score is updated automaticaly and the username is entered by the player.
How can I design a datagrid that displays records and when one record is double-clicked, you can edit that record or when the datagrid record is double-clicked you can view the past history of that particular record in detail?
If you can view the "chart of accounts" in QuickBooks, then you will understand what I mean.
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?
I have an application I am creating that displays pump information based on customers in a database. I am using VB2008 .NET3.5.I have a combobox that has a selection for a unit of measure. What I want to happen is when that is changes the labels that have a unit of measure change to reflect the change. There are 15 labels total that need to be changed and all there names are the only ones in the project that start with a X if that helps at all.
I would like to avoid creating a bunch of labels and changing the visible property and just change the text value of each one. I have just started learning VB.NET
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:
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]
how I can control the tool tip popup or make calls to the text that displays based on a integer value. I'm wanting it to display a text based on a interger value inside an if statment for a picture box. So if the ingteger = 1 then tooltip.text = "" else tooltip.text = "" but that is not the correct syntax.
How can I make a highscore page with 2 arrays that store a name and a score. I want my highscore page to have thier name and score but also only have 10 high scores with highest to lowest. Also it must save so anyone that plays will see it.
I've tried to implement this highscore saving feature, so that when my application closes, the highscore saves within the my.settings storage function, and when my program loads up again, the same highscore loads up from this file. atm, it works ONLY within the application (I can close forms and it's still there, but if i end the program it resets to 0 next time it's loaded).it's basically 2 lines of code..1 for saving and 1 for loading..is this the best way to save a highscore for a game? I was initially thinking of making a database and linking it to that, but apprantly it's easier with the My.settings. even thought of using stremawriter but it's more uneccessary work over my.settings.[code]
Assume you have controls A, B, C, D and E all with a Visibility property. You also have states 1,2,3,4,5 and 6 in which various combinations of your controls would be displayed. Currently this is being handled by switch statements for each state: i.e.
Select Case PageState case "1" a.visible = false b.visible = true
[code]....
As you can imagine, this becomes a pain as every state needs a show/hide statement for each control. How can I refactor this so that adding controls and/or states becomes trivial?My first instinct is to extend the control and add a collection of states that it should display for but this sounds like overkill.
Edit:I was deliberately vague in my question in case this has other implications. In my current instance the "controls" in question are ASP Panels. Does that change anything?
I am creating a custom Label control (by simply Inheriting the standard Label control and re-painting the background and text) because I need a very specific background and border. In the constructor of the control, I set the AutoSize property to false so I can have a standard default size for the new label.
Public Sub New() /*Set the default size of the control to 75x24*/ Me.Height = 24
[code]....
In my application that uses this control, if I create the new custom label at run time (in code), the AutoSize property stays False, and it works properly.If I try to add the new custom label to my form at design time, it comes in with the AutoSize property set to True, and I have to manually set it to False in the properties window. It's not a huge problem, but I don't understand why the behavior is different.
I need to design a simple label designer that could print labels for shelf items, just like in a grocery store. The requirements are that the label shall contain a name, a barcode (e.g. Code39 symbology), price and room for some extra text.
I have an application you log into based on an ID number (example 45)
In the app, there is a label. By default is has "lblID" in it, when when you log in, the 45 goes there (comes from MySQL)
I need to create a new folder on startup, and that folder needs to be named according to that ID number.
The problem I'm running into , is when the application starts, it creates the folder just fine, but it never names it according to the ID. It always names it lblID.
The code to create the folder is in the frmLoad- x.CreateIDfolder() Then it goes to the code in a module- Public Sub CreateIDfolder()
i want to blink any of the for labels if the back color is LimeGreen.Timer5 is enabled already and starts at form closing event of another for.so on the timer tick i have below code.
Dim time2 As Integer Private Sub Timer5_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick If (time2 = 1) And Label17.BackColor = Color.LimeGreen Then Label17.SendToBack()
Just wondering if someone can at least point out where I'm going wrong here. I've already got the code to populate the listbox by a button click from the user and am just trying to figure out how exactly to alter the text of a label based on what the user selects in the listbox. From what I have the Label will display the case else selection but nothing else despite my best efforts to get it to change. Here is what I've tried. I realize it is very trivial, but I am only a beginner to programming.
my code below, though it didnt work. i want to display text on label if the colors of label on anoda form is orange.correct me where am wrong. or advice better way to do this.
If Main1.Label15.BackColor = Color.Orange Then Label2.Text = "1" And Label4.Text = "N5,000" ElseIf Main1.Label14.BackColor = Color.Orange Then
In a piece of code I am writing I am trying to change the text of a label in my form based on a timer. I have MANY other labels that are all updating in their own subs and when I try to add any new labels(in any sub) to update it wont. I am using Label.Text = counter where counter is a string that is changing. I have tried refreshing the form, Label.refresh() Label1.Update()....The only thing I think it could be is that the redraw is being held up by other calculations on the cpu. How can I make the label text change and update properly?
I have the form with a tab control on it, there are 5 tabs each with a label contained in the tab-page.I want to have a button outside of the tab that changes on the form. when clicked the button will change the text of the label based on which tab is currently selected. I know it should be possible to do this, I'm not too sure where to start.
I'm calling some data from my Oracle table and I have a field which is called 'image1' which is a BLOB field.
Sometimes an image is input into the field and others it's not. I need a way to read the BLOB field to see if its a blank and then show/hide my label based on its contents.[code]...
I need to set the background color of a label based on the value of a vertical scrollbar. i.e, if the user click the vScrollBar the background color of label must change like from 0 to 255.if it reaches to 255 again initialise to 0. I tried color.FromARGB function but it is not working.
form1 have four buttons, i want to set a label text in form2 according to which of the button on form1 is clicked.below is what i tried so far.on form1 each of the button click event i made it focus
Private Sub Answerbtn3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Answerbtn3.Click Me.Focus() Form2.Show()
and on form 2 load event i have
Private Sub FinalAnswer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Main1.Answerbtn1.Focus Then Label2.Text = "You choosed option '
[code]....
the above code displays only the first condition ("You choosed option 'A'"") on the label when any of the button is clicked?