-
C#修改Windows电脑的计算机名
Visual C#修改计算机名,修改电脑名称为另一个自定义的新名称,代码较简单,这里不多做介绍了,运行界面如示例截图所示。以下为核心部分代码,先睹为快,完整源码项目请下载:
[DllImport("kernel32.dll")]
private static extern int SetComputerName(string ipComputerName);//重写API函数
private void Frm_Main_Load(object sender, EventArgs e)
{
Computer computer = new Computer();//创建计算机对象
textBox1.Text = computer.Name;//显示计算机名称
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox2.Text == "")//判断计算机名称是否为空
{
MessageBox.Show("计算机名称不能为空!");
}
else
{
SetComputerName(textBox2.Text);//修改计算机名称
MessageBox.Show("计算机名称修改成功,请重新启动计算机使之生效!");
}
}
- 2022-03-07 15:38:03下载
- 积分:1
-
电子商务 物流 ASP+SQL2
电子商务 物流 ASP+SQL2-ASP e-commerce logistics SQL2
- 2022-08-10 11:07:21下载
- 积分:1
-
flash TextBox xml文字公告滚动动画特效
flash TextBox xml文字公告滚动动画特效,文字是在 TextBox 中显示,文字保存在Xml中,由Flash运行后自动读取文字,修改文字只需打开XML文件即可。
- 2022-07-22 14:23:51下载
- 积分:1
-
dfjklf kajsdhksjdfhuwei嗨
kajsdhksjdfhuwei oi dfjklf-lkwheowi
- 2022-12-26 19:05:03下载
- 积分:1
-
dos Directory is a comprehensive basis of hope downloading
dos基础教程 很全面的 希望大家下载-dos Directory is a comprehensive basis of hope downloading
- 2022-03-03 14:58:51下载
- 积分:1
-
以前一直用vb,只有这类源码。现在在学c,请支持。
以前一直用vb,只有这类源码。现在在学c,请支持。-previously been used vb, the only such source. C in school now, please support.
- 2023-06-04 12:45:03下载
- 积分:1
-
操作系统模拟磁盘调度算法 先进先出 最短优先 扫描算法
操作系统模拟磁盘调度算法 先进先出 最短优先 扫描算法-disk operating system simulation algorithm FIFO scheduling priority shortest scanning algorithm
- 2023-04-06 05:25:03下载
- 积分:1
-
VC++开发的数字水准仪数据采集与处理程序,实现数字水准仪的模拟测量。...
VC++开发的数字水准仪数据采集与处理程序,实现数字水准仪的模拟测量。-VC++ Development of Digital Level data acquisition and processing procedures, the realization of digital levels of the analog measurements.
- 2023-06-20 05:50:05下载
- 积分:1
-
Flash滑块应用实例:拖动滑块放大图片
Flash滑块应用实例:拖动滑块放大图片,拖动那个小方块,就可以控制图片在舞台区域移动放大显示,挺不错的创意,你可学习下滑块的使用,用滑块改变数值等的实现。
- 2023-04-02 14:45:04下载
- 积分:1
-
小例子 小例子 小例子
小例子 小例子 小例子-Small examples of small examples of small examples of small examples
- 2022-01-25 17:32:57下载
- 积分:1