摘要: /// /// 实现点击任务栏图标显示或隐藏窗体 /// protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.Style = cp.Style | 0x20000;//允许最小化操作 return... 阅读全文
posted @ 2019-01-15 15:49 starriver 阅读(377) 评论(0) 推荐(0) 编辑
摘要: Dictionary dict = new Dictionary(); List list = new List(); object missing = Missing.Value; Application excel = new Application(); excel.Visible = false; excel.UserControl = true; Workbook book = ex... 阅读全文
posted @ 2018-07-25 13:37 starriver 阅读(583) 评论(0) 推荐(0) 编辑
摘要: /// /// table转实体类 /// /// private static void Model(System.Data.DataTable table) { models = new List(); foreach (DataRow row in table.Rows) { T model = new T(); foreach... 阅读全文
posted @ 2018-07-25 11:50 starriver 阅读(727) 评论(0) 推荐(0) 编辑
摘要: OracleConnection con = new OracleConnection(@"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XXX)));Persist Security Info=True;User ID=XXX;Pas... 阅读全文
posted @ 2018-07-25 11:49 starriver 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 为了避免死锁,可以在应用程序的体系架构中一开始就设计好锁定顺序,也可以为锁定定义超时时间 阅读全文
posted @ 2017-11-13 17:21 starriver 阅读(126) 评论(0) 推荐(0) 编辑
摘要: //控件重绘 [DllImport("USER32.DLL ", CharSet = CharSet.Auto, SetLastError = true)] public static extern bool SendMessage( IntPtr hWnd, // 目标窗口句柄 int Msg, // 消息 bool wParam, // 第一个消息参数 fals... 阅读全文
posted @ 2017-11-07 10:42 starriver 阅读(220) 评论(0) 推荐(0) 编辑
摘要: private void panel1_Paint(object sender, PaintEventArgs e) { Control _Control = (Control)sender; ShowScrollBar(_Control.Handle, 4, 0); } /// /// 禁用panel垂直或者水平滚动条 /// /// /// 0垂直滚动条,1水平滚动条,... 阅读全文
posted @ 2017-11-07 10:18 starriver 阅读(6368) 评论(0) 推荐(1) 编辑
摘要: public Form1() { InitializeComponent(); this.MouseWheel += Form1_MouseWheel; } /// /// 滚动方法 /// /// /// void Form1_MouseWheel(object sender, MouseEventArgs e) { //获取光标位置 Point mou... 阅读全文
posted @ 2017-11-07 09:47 starriver 阅读(454) 评论(0) 推荐(0) 编辑
摘要: public class CodeProvider { //动态创建Driver类 private string strStart = "using System;" + "public static class Driver { public static void Main(){ "; private string strEnd = " } }"; /// ... 阅读全文
posted @ 2017-11-02 17:01 starriver 阅读(226) 评论(0) 推荐(0) 编辑