2008年6月4日
摘要: c#(winform)中ComboBox和ListBox添加项完全解决刚开始用.net 的winform开发,发现好些控件都很难用,可能是不熟悉的原因吧,这不,一个给ComboBox添加项的问题就搞的我很头疼,我要同时给一个项添加名字和值,怎么都没法加,查了查资料,又自己汇总测试了下,终于全部搞定了,现把完整的方案写下。用comboBox的数据绑定的方法很简单,建一个数据源,绑定到ComboBox... 阅读全文
posted @ 2008-06-04 12:06 胡秉征 阅读(583) 评论(0) 推荐(0) 编辑
  2008年5月30日
摘要: using System;using System.Runtime.InteropServices; class shoutdown{ [StructLayout(LayoutKind.Sequential, Pack=1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } ... 阅读全文
posted @ 2008-05-30 22:19 胡秉征 阅读(485) 评论(0) 推荐(0) 编辑
摘要: System.Net.WebRequest request = System.Net.FileWebRequest.Create("http://192.168.1.12:8080/eclipse_tfw_xzxt/jsp_sample/sample_6.jsp?param_a=Java&param_b=.Net"); System... 阅读全文
posted @ 2008-05-30 22:19 胡秉征 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1. Windows Forms中禁用窗体的关闭按钮添加必要的命名空间:using System.Runtime.InteropServices;添加必要的常数和API函数的引用private const int SC_CLOSE = 0xF060;private const int MF_ENABLED = 0x00000000;private const int MF_GRAYED = 0x0... 阅读全文
posted @ 2008-05-30 22:18 胡秉征 阅读(2857) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Runtime.InteropServices;using System.Threading;namespace LockWindows{/// <summary>/// NativeWIN32 的摘要说明。/// </summary>public class NativeWIN32{public NativeWIN32(... 阅读全文
posted @ 2008-05-30 22:17 胡秉征 阅读(1688) 评论(1) 推荐(1) 编辑