Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApplication9
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- MessageBox.Show(e.ToString());
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void button2_MouseDown(object sender, MouseEventArgs e)
- {
- if (e.Button == MouseButtons.Left) MessageBox.Show("DU ER VENSTREORIENTERET");
- if (e.Button == MouseButtons.Right) MessageBox.Show("Du er DF");
- }
- private void button2_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyData == Keys.A) button2.Location = new Point(button2.Location.X - 20, button2.Location.Y);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment