No title

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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 MoreDialogExamples
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            label1.Text = "";
            label2.Text = "";
            label3.Text = "";
            label4.Text = "";
        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            label1.Text = "";
            // launch the openFileDialog
            if( openFileDialog1.ShowDialog() == DialogResult.OK )
            {
                label1.Text = openFileDialog1.FileName;
            }
        }

        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            label1.Text = "";
            // launch the saveFileDialog
            if( saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                label1.Text = saveFileDialog1.FileName;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            label1.Text = sender.ToString();
            label2.Text = e.ToString();
        }

        private void button1_MouseClick(object sender, MouseEventArgs e)
        {
            label1.Text = sender.ToString();
            label2.Text = String.Format("X {0} Y{1}", e.X, e.Y);
            if( e.Y < button1.Height/2.0 )
            {
                label3.Text = "You clicked the top of the button!";
            }
            else
            {
                label3.Text = "Bottomclicker!!!";
            }
            
        }

        private void button1_DragDrop(object sender, DragEventArgs e)
        {
            
        }
    }
}