-
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
-
tubedivide
应用于水利上河流的流管划分,输入断面数据和划分流管数量进行流管划分。(Applied to the flow tube is divided on river water conservancy input section data and divided the number of stream flow tube pipe division.)
- 2014-01-09 10:17:02下载
- 积分:1
-
F405_PCA9685_test
For PCA9685.
STM32F405 is needed
- 2019-02-01 23:23:34下载
- 积分:1
-
ts35nd5b
TS35ND5B-01_TFT_touch_panel.pdf TS35ND5B-01_TFT_touch_panel.pdf-TS35ND5B-01_TFT_touch_panel.pdf
- 2022-02-22 10:36:59下载
- 积分:1
-
清华大学的数据结构讲座,C++语言,相当不错,还有我。
清华大学数据结构讲义,c语言的,很不错,就不必细说了吧。-data structure lectures Tsinghua University, c language, quite well, and there is no need to elaborate on it.
- 2022-04-09 09:24:13下载
- 积分:1
-
PLSUVE
基于偏最小二乘回归的matlab中无信息变量消除算法的特征选择(Feature Selection of No Information Variable Elimination Algorithm in Matlab Based on Partial Least Squares Regression)
- 2021-02-05 16:39:57下载
- 积分:1
-
C#启动Windows IIS服务的实例
C#启动指定的Windows信使服务,本例中是启动IIS服务,在Windows XP下可完美运行,在Windows7下不行好像,本程序演示如何在C#的程序中启动一个指定的Windows内置服务的方法。具体的实现代码:
ServiceController service = new ServiceController();//创建服务控制对象
service.ServiceName = "Messenger";//启动Windows信史服务
//判断当前服务状态
if (service.Status == ServiceControllerStatus.Stopped)
{
try
{
service.Start();// 启动服务
service.WaitForStatus(ServiceControllerStatus.Running);
}
catch (InvalidOperationException)
{
MessageBox.Show("不能启动该服务!");
}
}
- 2022-02-13 12:56:43下载
- 积分:1
-
0334508001429252295_sift algorithm complete
说明: matlab code for CM using sift
- 2019-05-21 13:45:51下载
- 积分:1
-
baobiao
报表制作程序演示(statements prepared demo)
- 2005-01-11 03:55:27下载
- 积分:1
-
太赫兹
说明: 对太赫兹的性能进行了仿真比较,适合对比着学习(The performance of terahertz is simulated and compared, which is suitable for comparative learning)
- 2021-03-19 17:38:12下载
- 积分:1