This is herman's Blog!

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

文章分类 -  c#

摘要:[STAThread] static void Main() { Process instance = RunningInstance(); if (instance == null) { Application.Run(new mainFrm()); } else { //MessageBox.Show("此程序已经启动!"); HandleR... 阅读全文
posted @ 2005-05-16 18:14 This is herman's Blog! 阅读(322) 评论(0) 推荐(0)

摘要:1.通过执行命令,会有cmd窗口一闪而过: public void Get_Share(string remotepath, string localpath, string username, string password) { Process.Start("net"," use "+localpath+" "+remotepath+" "+password+" /user:"+use... 阅读全文
posted @ 2005-05-16 18:13 This is herman's Blog! 阅读(491) 评论(0) 推荐(0)

摘要:因为业务需要,需要给公司部分终端进行登记,以保证授权终端能够登录业务系统,最好的方法就是记录下每台终端的MAC地址来进行验证是否有授权。 下面是采用调用API的方式获取指定IP的终端的MAC地址: [DllImport("Iphlpapi.dll")] public static extern int SendARP(Int32 dest, Int32 host, re... 阅读全文
posted @ 2005-05-16 17:51 This is herman's Blog! 阅读(1048) 评论(0) 推荐(0)