摘要:
private void mainform_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; System.Drawing.Bitmap xzfy = new System.Drawing.Bitmap(Application.StartupPath + "//img/背景.png"); g.DrawImage(xzfy, this.ClientRectangle); } private void loa... 阅读全文
摘要:
0.新建窗体 及添加按钮1. 执行如下按钮事件 private void btnFormMax_Click(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Maximized) { this.WindowState = FormWindowState.Normal; } else { this.WindowState = FormWindowState.Maximized; } } 窗体最大化时 非全屏 不会遮盖任务栏 此时this.FormBorderStyle 默认为 Sizable2. 执行如下按 阅读全文
摘要:
当船体设置为FormborderStyle='none'[DllImport("user32.dll")]public static extern bool ReleaseCapture();[DllImport("user32.dll")]public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);public const int WM_SYSCOMMAND = 0x0112;public const int SC_MOVE = 阅读全文