CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  C#

如何用C#编写这些代码?

楼主shcy0524(小胖)2005-08-21 11:35:33 在 .NET技术 / C# 提问

我要编写代码得知我电脑是否已与internat网连接? 问题点数:20、回复次数:2Top

1 楼wsh236(与龙同在)回复于 2005-08-21 11:42:17 得分 0

listBox1.Items.Add("ComputerName   :   "   +   SystemInformation.ComputerName   );  
  listBox1.Items.Add("Network     :   "   +   SystemInformation.Network     );  
  listBox1.Items.Add("UserDomainName     :   "   +   SystemInformation.UserDomainName     );                          
  listBox1.Items.Add("UserName       :   "   +   SystemInformation.UserName       );                  
  listBox1.Items.Add("BootMode   :   "   +   SystemInformation.BootMode   );  
  listBox1.Items.Add("MenuFont   :   "   +   SystemInformation.MenuFont   );  
  listBox1.Items.Add("MonitorCount   :   "   +   SystemInformation.MonitorCount   );  
  listBox1.Items.Add("MonitorsSameDisplayFormat   :   "   +   SystemInformation.MonitorsSameDisplayFormat.ToString()   );  
  listBox1.Items.Add("ArrangeDirection:   "   +   SystemInformation.ArrangeDirection);  
  listBox1.Items.Add("MousePresent   :   "   +   SystemInformation.MousePresent   );  
  listBox1.Items.Add("MouseButtonsSwapped         :   "   +   SystemInformation.MouseButtonsSwapped         );          
  listBox1.Items.Add("UserInteractive         :   "   +   SystemInformation.UserInteractive         );  
  listBox1.Items.Add("VirtualScreen:   "   +   SystemInformation.VirtualScreen   );Top

2 楼helloworld84(思考中....)回复于 2005-08-21 11:45:59 得分 20

[DllImport("wininet.dll")]  
   
                  public   extern   static   bool   InternetGetConnectedState(   out   int   connectionDescription,   int   reservedValue   )   ;  
   
                  public   InternetGetConnectedState1()   {   }  
   
     
   
                  public   bool   IsConnected()  
   
                  {  
   
                                  int   I=0;  
   
                                  bool   state   =   InternetGetConnectedState(out   I,0);  
   
                                  return   state;  
   
                  }Top

相关问题

  • C语言中如何编写获得文件大小的代码
  • SCRICPT中如何使用C#语言编写的代码中的变量
  • 求在linux下用c或c++编写的源代码
  • 如何用代码编写菜单
  • vb如何编写队列?源代码?
  • 如何编写代码复制图片?
  • ASP。net中如何用C#编写一段可上传文件的代码啊?谢谢
  • 征求用vs.net编写c#代码时:有用的快捷键!
  • 求用c++编写的有关图形的源代码!
  • 求ASP.NET C#编写的网站源代码。200(分)相送。

关键词

  • systeminformation
  • listbox1
  • items
  • add

得分解答快速导航

  • 帖主:shcy0524
  • helloworld84

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo