Programming, Music, Games. Creation.

Some Simple Stuff :)


yes the form is invisible LOL..

Code:

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 Some_Simple_Stuff
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Form1.ActiveForm.Text = textBox1.Text;//this.Text = = textBox1.Text;
}

private void trackBar1_Scroll(object sender, EventArgs e)
{
this.Opacity = 0.2 + (this.trackBar1.Value / 12.0); //changes form opacity, 1=visible;0=invisible;
}

private void button2_Click(object sender, EventArgs e)
{
if (progressBar1.Value < 100)//avoid error
{
progressBar1.Value = progressBar1.Value + 10;//increase in progress bar
}
else//avoid error
{
label1.Text = “The value has reached its limit”;//warning
}
}

private void button3_Click(object sender, EventArgs e)
{
if (progressBar1.Value > 0)//avoid error
{
progressBar1.Value = progressBar1.Value – 10;//decrease in progress bar
}
else//avoid error
{
label1.Text = “The value has reached its lowest value”;//warning
}
}
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s