Name of program: "Progress Bar Racers"
Some facts
Spoiler
424 Lines Of Code13074 Letters, Numbers & Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
Download
But I can give you the code!
Spoiler
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
public partial class Form1 : Form
{
int money;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
listBox1.SelectedIndex = 0;
}
private void button1_Click(object sender, EventArgs e)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
p1.Value = 0;
p2.Value = 0;
p3.Value = 0;
p4.Value = 0;
Random rnd1 = new Random();
Random rnd2 = new Random();
Random rnd3 = new Random();
Random rnd4 = new Random();
int rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
int rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
int rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
int rand4 = rnd4.Next(1, 254);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
con1.Interval = rand1;
con2.Interval = rand2;
con3.Interval = rand3;
con4.Interval = rand4;
con1.Start();
con2.Start();
con3.Start();
con4.Start();
}
private void con1_Tick(object sender, EventArgs e)
{
p1.Increment(1);
if (p1.Value == 100)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
if (listBox1.SelectedIndex == 0)
{
money += Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 1)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 2)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 3)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
}
}
private void con2_Tick(object sender, EventArgs e)
{
p2.Increment(1);
if (p2.Value == 100)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
if (listBox1.SelectedIndex == 0)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 1)
{
money += Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 2)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 3)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
}
}
private void con3_Tick(object sender, EventArgs e)
{
p3.Increment(1);
if (p3.Value == 100)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
if (listBox1.SelectedIndex == 0)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 1)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 2)
{
money += Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 3)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
}
}
private void con4_Tick(object sender, EventArgs e)
{
p4.Increment(1);
if (p4.Value == 100)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
if (listBox1.SelectedIndex == 0)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 1)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 2)
{
money -= Convert.ToInt32(numericUpDown1.Value);
}
if (listBox1.SelectedIndex == 3)
{
money += Convert.ToInt32(numericUpDown1.Value);
}
}
}
private void button2_Click(object sender, EventArgs e)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
}
private void button3_Click(object sender, EventArgs e)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
p1.Value = 0;
p2.Value = 0;
p3.Value = 0;
p4.Value = 0;
}
private void button4_Click(object sender, EventArgs e)
{
con1.Stop();
con2.Stop();
con3.Stop();
con4.Stop();
p1.Value = 0;
p2.Value = 0;
p3.Value = 0;
p4.Value = 0;
Random rnd1 = new Random();
Random rnd2 = new Random();
Random rnd3 = new Random();
Random rnd4 = new Random();
int rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
rand1 = rnd1.Next(255);
int rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
rand2 = rnd2.Next(255);
int rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
rand3 = rnd3.Next(255);
int rand4 = rnd4.Next(1, 254);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
rand4 = rnd4.Next(1, 255);
con1.Interval = rand1;
con2.Interval = rand2;
con3.Interval = rand3;
con4.Interval = rand4;
con1.Start();
con2.Start();
con3.Start();
con4.Start();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listBox1.SelectedIndex == 0)
{
betp.Text = "Player 1";
}
if (listBox1.SelectedIndex == 1)
{
betp.Text = "Player 2";
}
if (listBox1.SelectedIndex == 2)
{
betp.Text = "Player 3";
}
if (listBox1.SelectedIndex == 3)
{
betp.Text = "Player 4";
}
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
label1.Text = "$" + numericUpDown1.Value.ToString();
}
private void button5_Click(object sender, EventArgs e)
{
ms("Username: " + textBox1.Text + "\nMoney: " + money);
}
private void ms(string sMessage)
{
MessageBox.Show(sMessage);
}
}
}