c#取消拖拽改变大小时候即时刷新界面
By
admin
at 2022-11-14 • 0人收藏 • 459人看过
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp7 { public partial class Form1 : Form { [DllImport("user32", CharSet = CharSet.Auto)] private static extern bool SystemParametersInfo(int uAction, bool uParam, int lpvParam, int fuWinIni); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { //取消拖动大小时候即时刷新 SystemParametersInfo(0x25/*SPI_SETDRAGFULLWINDOWS*/, false, 0, 0); } } }
登录后方可回帖