随笔分类 - C# / ASP.NET
C# winform 窗体最大化及还原方法
摘要:假设是单击button触发的click事件: 1 /// 2 /// 全屏按钮的Click事件 3 /// 4 /// 5 /// 6 private void btnFullScreen_Click(object sender, EventArgs e) 7 { 8 if (this.WindowState == FormWindowState.Maximized) 9 {10 this.Win...
阅读全文
Win7/8下通过C#获取IPv4的方法
摘要:1 IPHostEntry IpEntry = Dns.GetHostEntry(Dns.GetHostName()); 2 string myip; 3 foreach (IPAddress ip in IpEntry.AddressList) 4 { 5 if (ip.AddressFamily == AddressFamily.InterNetwork) 6 { 7 myip = ip.T...
阅读全文
浙公网安备 33010602011771号