System.Environment.OsVersion属性可以达到你的要求。OperatingSystem m_OpeSystem;
m_OpeSystem = System.Environment.OSVersion; m_OpeSystem.PlatformID的值可判断操作系统类别:
Win32NT:The operating system is Windows NT or later.
Win32S: The operating system is Win32s. Win32s is a layer that runs on 16-bit versions of Windows to provide access to 32-bit applications.
Win32Windows:The operating system is Windows 95 or later. m_OpeSystem.Version可判断操作系统版本。
m_OpeSystem = System.Environment.OSVersion; m_OpeSystem.PlatformID的值可判断操作系统类别:
Win32NT:The operating system is Windows NT or later.
Win32S: The operating system is Win32s. Win32s is a layer that runs on 16-bit versions of Windows to provide access to 32-bit applications.
Win32Windows:The operating system is Windows 95 or later. m_OpeSystem.Version可判断操作系统版本。
谢谢。
System.ProcessService;..阿,程序太长勒放不上.你有邮箱么我发给你
lvProcess.View = System.Windows.Forms.View.Details;
lvProcess.Columns.Add("Process Name",100,System.Windows.Forms.HorizontalAlignment.Left);
lvProcess.Columns.Add("Window Text",125,System.Windows.Forms.HorizontalAlignment.Left);
lvProcess.Columns.Add("Memory Usage",85,System.Windows.Forms.HorizontalAlignment.Right);
lvProcess.Columns.Add("Process ID",75,System.Windows.Forms.HorizontalAlignment.Right);
foreach(System.Diagnostics.Process tmpprocess in allprocesses)
{
string[] strinfo=new string[3];
strinfo[0]=tmpprocess.MainWindowTitle;
strinfo[1]=string.Format("{0:#,###,###}K",((tmpprocess.WorkingSet)/1024));
strinfo[2]=tmpprocess.Id.ToString();
(lvProcess.Items.Add(tmpprocess.ProcessName)).SubItems.AddRange(strinfo);
}
发给我一份吧。