我正在为霍尼韦尔Dolphin 6100开发一个应用程序,这是一款带有条形码扫描器的移动计算机,它使用Windows CE 5.0,就像操作系统一样。
我想使用代码行获取设备名称。
有人对此有所了解吗?
注意:我在win7上使用C#与VS2008合作。
答案 0 :(得分:0)
private const string IDENTITY = @"HKEY_LOCAL_MACHINE\Ident";
private const string NAME = "Name";
string DeviceName = (string)Registry.GetValue(IDENTITY, NAME, "NAME");
答案 1 :(得分:0)
我们为同一设备开发了一个应用程序,我们使用此感测来获取设备名称。
Private Sub deviceidt_ParentChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles deviceidt.ParentChanged
Dim deviceidn As String = System.Net.Dns.GetHostName
deviceidt.Text = deviceidn
End If
End Sub