900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > (原创)C#获取本地计算机名 IP MAC地址

(原创)C#获取本地计算机名 IP MAC地址

时间:2023-01-09 20:53:55

相关推荐

(原创)C#获取本地计算机名 IP MAC地址

(原创)C#获取本地计算机名,IP,MAC地址,(原创)C#获取本地计算机名,IP,MAC地址

using System;using MAC_IP_name{ ///

/// Form1 的摘要说明。 ///public class Form1 : { private label4; private groupBox1; private txtMac; private txtIp; private txtName; private lblMac; private lblIp; private lblName; private button1; private button2; ////// 必需的设计器变量。 ///private components = null; public Form1() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // } ////// 清理所有正在使用的资源。 ///protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { (); } } ( disposing ); } #region Windows 窗体设计器生成的代码 ////// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 ///private void InitializeComponent() { = new (); = new (); = new (); = new (); = new (); = new (); = new (); = new (); = new (); = new (); .SuspendLayout(); (); // // label4 // .AutoSize = true; .Font = new System.Drawing.Font("楷体_GB2312", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134))); .ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(128))); .Location = new System.Drawing.Point(49, 16); .Name = "label4"; .Size = new System.Drawing.Size(245, 26); .TabIndex = 7; .Text = "获取本机计算机名IP与MAC"; // // groupBox1 // .Controls.Add(); .Controls.Add(); .Controls.Add(); .Controls.Add(); .Controls.Add(); .Controls.Add(); .Controls.Add(); .Controls.Add(); .Location = new System.Drawing.Point(16, 56); .Name = "groupBox1"; .Size = new System.Drawing.Size(320, 208); .TabIndex = 11; .TabStop = false; .Text = "获取区"; // // button2 // .Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134))); .Location = new System.Drawing.Point(184, 160); .Name = "button2"; .Size = new System.Drawing.Size(88, 32); .TabIndex = 18; .Text = "退出"; .Click += new System.EventHandler(_Click); // // txtMac // .BackColor = System.Drawing.Color.FromArgb(((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224))); .Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134))); .ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(0))); .Location = new System.Drawing.Point(128, 110); .Name = "

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。