30.05.09


using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication1

{

public partial class Form1 : Form

{

char kierunek;

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{//gora

kierunek='g';

}

private void timer1_Tick(object sender, EventArgs e)

{

if (kierunek== 'g')

pictureBox1.Top=pictureBox1.Top-10;

if (kierunek== 'p')

pictureBox1.Left=pictureBox1.Left+10;

if (kierunek== 'd')

pictureBox1.Top=pictureBox1.Top+10;

if (kierunek== 'l')

pictureBox1.Left=pictureBox1.Left-10;

if (kierunek== 's')

pictureBox1.Top=pictureBox1.Top-10;

}

private void button2_Click(object sender, EventArgs e)

{

kierunek='p';

}

private void button3_Click(object sender, EventArgs e)

{

kierunek='d';

}

private void button4_Click(object sender, EventArgs e)

{

kierunek='l';

}

private void button5_Click(object sender, EventArgs e)

{

kierunek = 's';

timer1.Enabled = false;

}

}

}

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication1

{

public partial class Form1 : Form

{

char kierunek;

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{//gora

kierunek='g';

}

private void timer1_Tick(object sender, EventArgs e)

{

/* if (kierunek== 'g')

pictureBox1.Top=pictureBox1.Top-10;

if (kierunek== 'p')

pictureBox1.Left=pictureBox1.Left+10;

if (kierunek== 'd')

pictureBox1.Top=pictureBox1.Top+10;

if (kierunek== 'l')

pictureBox1.Left=pictureBox1.Left-10;

if (kierunek== 's')

pictureBox1.Top=pictureBox1.Top-10;

*/

switch (kierunek)

{case 'g':

pictureBox1.Top=pictureBox1.Top+10;

break;

case 'd':

pictureBox1.Top=pictureBox1.Top-10;

break;

case 'l':

pictureBox1.Left=pictureBox1.Left-10;

break;

case 'p':

pictureBox1.Left=pictureBox1.Left+10;

break;

}

}

private void button2_Click(object sender, EventArgs e)

{

kierunek='p';

}

private void button3_Click(object sender, EventArgs e)

{

kierunek='d';

}

private void button4_Click(object sender, EventArgs e)

{

kierunek='l';

}

private void button5_Click(object sender, EventArgs e)

{

kierunek = 's';

timer1.Enabled = false;

}

}

}

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication2

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void Form1_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.Up)

pictureBox1.Top = pictureBox1.Top - 10;

if (e.KeyCode == Keys.Down)

pictureBox1.Top = pictureBox1.Top + 10;

if (e.KeyCode == Keys.Left)

pictureBox1.Left = pictureBox1.Left - 10;

if (e.KeyCode == Keys.Right)

pictureBox1.Left = pictureBox1.Left + 10;

}

}

}

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication4

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void kolorTłaToolStripMenuItem_Click(object sender, EventArgs e)

{

}

private void czarnyToolStripMenuItem_Click(object sender, EventArgs e)

{

this.BackColor = Color.Red;

}

private void zielonyToolStripMenuItem_Click(object sender, EventArgs e)

{

this.BackColor = Color.Green;

}

private void duzeToolStripMenuItem_Click(object sender, EventArgs e)

{

this.Width=500;

this.Height = 500;

}

private void maleToolStripMenuItem_Click(object sender, EventArgs e)

{

this.Width = 150;

this.Height = 150;

}

}

}

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication4

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void kolorTłaToolStripMenuItem_Click(object sender, EventArgs e)

{

}

private void czarnyToolStripMenuItem_Click(object sender, EventArgs e)

{

this.BackColor = Color.Red;

}

private void zielonyToolStripMenuItem_Click(object sender, EventArgs e)

{

this.BackColor = Color.Green;

}

private void duzeToolStripMenuItem_Click(object sender, EventArgs e)

{

this.Width=500;

this.Height = 500;

}

private void maleToolStripMenuItem_Click(object sender, EventArgs e)

{

this.Width = 150;

this.Height = 150;

}

private void richTextBox1_TextChanged(object sender, EventArgs e)

{

}

private void niebieskiToolStripMenuItem_Click(object sender, EventArgs e)

{

richTextBox1.BackColor = Color.Blue;

}

private void zielonyToolStripMenuItem1_Click(object sender, EventArgs e)

{

richTextBox1.BackColor = Color.Green;

}

private void czerownyToolStripMenuItem_Click(object sender, EventArgs e)

{

richTextBox1.BackColor = Color.Red;

}

private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)

{

}

}

}

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication8

{

public partial class Form1 : Form

{

Form2 okno2;

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

{

}

private void button1_Click(object sender, EventArgs e)

{

okno2 = new Form2();

}

private void button2_Click(object sender, EventArgs e)

{

okno2.Show();

}

private void button3_Click(object sender, EventArgs e)

{

okno2.Hide();

}

private void button4_Click(object sender, EventArgs e)

{

okno2.Dispose();

}

}

}

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication8

{

public partial class Form1 : Form

{

Form2 okno2;

Form3 okno3;

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

{

}

private void button1_Click(object sender, EventArgs e)

{

okno2 = new Form2();

}

private void button2_Click(object sender, EventArgs e)

{

okno2.Show();

}

private void button3_Click(object sender, EventArgs e)

{

okno2.Hide();

}

private void button4_Click(object sender, EventArgs e)

{

okno2.Dispose();

}

private void button5_Click(object sender, EventArgs e)

{

okno3 = new Form3();

}

private void button6_Click(object sender, EventArgs e)

{

okno3.ShowDialog();

}

private void button7_Click(object sender, EventArgs e)

{

okno3.Hide();

}

private void button8_Click(object sender, EventArgs e)

{

okno3.Dispose();

}

}

}



Wyszukiwarka

Podobne podstrony:
PEDIATRIA wyniki 30 05 09(1)
Sesja 30 25 05 09
05 09 2012 INTERNA
2010 02 05 09;33;36
wprowadzenie 24-05-09, Wprowadzenie do psychologii
geo wyk 5 (30 10 09)
30 IV 09
Wyk-ad 8 - 13.04.05, 09
Egzamin-lekarski-termin III 05.09.2011 WYNIKI, Chemia medyczna UMP
30 05 islam karaimi i początek judaizmu
Ćwiczenia 05 09
2010 02 05 09;35;57
Biochemia - exam stoma - 30.05.2007, Prywatne, biochemia, biochemia 1, biochemia
05-09 PAM - Korzystanie z siły życiowej stworzenia, CAŁE MNÓSTWO TEKSTU
Szczęśliwa Dziesiątka Disco Polo (30 05 2010)
Harmonizacja i standaryzacja rachunkowości w3 30.05.2010
Wyk-ad 12 - 11.05.05, 09
30 05 07

więcej podobnych podstron