随笔分类 - WinForm
摘要:3步骤: 1.在需要自适应的Form中实例化全局变量 AutoSizeFormClass.cs源码在下方 AutoSizeFormClass asc = new AutoSizeFormClass(); 2.Form_Load事件中 asc.controllInitializeSize(this);
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace HelloCsharp { class Program { static
阅读全文
摘要:private void Form1_Load(object sender, EventArgs e) { bool Exist;//定义一个bool变量,用来表示是否已经运行 //创建Mutex互斥对象 System.Threading.Mutex newMutex = new System.Th
阅读全文
摘要:第一种:(调用系统API) 首先引入两个命名空间 using System.Runtime.InteropServices;using System.Reflection; 然后导入API [DllImport("user32.dll")]public static extern IntPtr Lo
阅读全文

浙公网安备 33010602011771号