using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace MultilineButton_CS
{
    public partial class Form1 : Form
    {
        [DllImport("coredll.dll")] 
        private static  extern int GetWindowLong(IntPtr hWnd, int nIndex);
    
        [DllImport("coredll.dll")] 
        private static  extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

        public  const int GWL_STYLE  = -16;

        // стиль многострочного текста
        public  const int BS_MULTILINE  = 0x2000; 

        public Form1()
        {
            InitializeComponent();
            #if DEBUG
                MinimizeBox = false;
            #else       
                MinimizeBox = true;
            #endif
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            IntPtr hWnd;
            int style;
            this.butMultiline.Capture = true;
            hWnd = butMultiline.Handle;
            this.butMultiline.Capture = false;
            style = GetWindowLong(hWnd, GWL_STYLE);
            SetWindowLong(hWnd, GWL_STYLE, style | BS_MULTILINE);
         }
    }
}