随笔分类 -  C#_winform开发

摘要:因项目需求,要实现个类似股票的键盘精灵采用LISTVIEW显示,采用LIST<T>查找方式和虚表的操作方式private List<ptobj> ptlist=null;ptlist = null;//查找的关键 ptlist = KeyPtsMap.getAllPts().FindAll(delegate(ptobj ptkey) { return ptkey.py.IndexOf(key) == 0; }); // listView1.Items.Clear(); int iPtlistCount = ptlist.Count; m_hListViewItems = 阅读全文
posted @ 2011-05-30 11:20 NN&&DD 阅读(372) 评论(0) 推荐(0)
摘要:这是项目中碰到的问题。在网上查了下,网上提供的解决方法 :1,将主线程设置为后台进程。方法是将主线程的isBackground= true。据说,这样在关闭主程序时后关闭主线程,并关闭所有的线程。但是我这样做没有成功。2,有人列出了c#程序退出的几种方法:(1)Application.Exit()//好像只在主线程可以起作用,而且当有线程,或者是阻塞方法的情况下,很容易失灵。(2) System.Environment.Exit(0) //无论在主线程或其它线程,都可以吧程序结束干净(3)Application.ExitThread();但是我发现(2)这个方法在.netFrame Work 阅读全文
posted @ 2011-05-29 11:23 NN&&DD 阅读(410) 评论(0) 推荐(0)
摘要:Remoting overVPN We have anapp using a tcp SAO over a LAN. All working quite happily.Recently tried it over an ADSL VPN supposing this would be quite transparent.The call to the SAO passes in a Stream parameter. The problem is that the callsjust hang for a while and then timeout with a Remoting exce 阅读全文
posted @ 2011-05-29 11:17 NN&&DD 阅读(73) 评论(0) 推荐(0)