I try to make some form control like Minimize, Exit and drag form but seems not work. I think the problem with partial class but after searching, I can't find solution to make this work. 

Note: I can't remove namespace and partial for some reason. What must I change, maybe declare etc?

```
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Threading;
    using System.Net.Sockets;
    using System.Net;

    namespace test
    {   
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

//Minimize (Not Work)
            private void Form1_Resize(object sender, EventArgs e)
            {
                if (FormWindowState.Minimized == this.WindowState)
                {
                    notifyTray.Visible = true;
                    notifyTray.ShowBalloonTip(500);
                    this.Hide();
                }

                else if (FormWindowState.Normal == this.WindowState)
                {
                    notifyTray.Visible = false;
                }
            }

//Exit (Not Work)
            private void Form1_FormClosing(object sender, FormClosingEventArgs e)
            {
                var window = MessageBox.Show("Wanna Close?", "Warning", MessageBoxButtons.YesNo);
                if (window == DialogResult.No) e.Cancel = true;
                else e.Cancel = false;
            }

//Drag (Not Work)
        public bool _dragging = false;
        public Point _offset;
        public Point _start_point = new Point(0, 0);

        void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            _dragging = true;  // _dragging is your variable flag
            _start_point = new Point(e.X, e.Y);
        }

        void Form1_MouseUp(object sender, MouseEventArgs e)
        {
            _dragging = false;
        }

        void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            if (_dragging)
            {
                Point p = PointToScreen(e.Location);
                Location = new Point(p.X - this._start_point.X, p.Y - this._start_point.Y);
            }
        }

```

In VB that code works fine.