摘要: private void cutScreen() { ini_init(); try { this.WindowState = FormWindowState.Minimized; //最小化当前窗口 Thread.Sleep(500);//延时2秒 if (Directory.Exists(myp 阅读全文
posted @ 2018-03-14 11:11 clarklxr 阅读(52) 评论(0) 推荐(0) 编辑
摘要: public class INIClass { public string inipath; [DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key 阅读全文
posted @ 2017-07-04 11:36 clarklxr 阅读(291) 评论(0) 推荐(0) 编辑
摘要: bool conTest() { SQLConnection mycon=new SQLConnection(constring) try { mycon.Oen(); if(mycon.state==ConnectionState.Open){ messageBox.Show("OK"); ret 阅读全文
posted @ 2017-07-04 11:31 clarklxr 阅读(121) 评论(0) 推荐(0) 编辑
摘要: TextView 1.设置TextView为上下可滑动模式 TextView tv=(TextView)findViewById(R.id.textview); tv.setMovemnetMethod(SrollingMovementMethod.getInstance()) android:sc 阅读全文
posted @ 2016-12-23 21:39 clarklxr 阅读(108) 评论(0) 推荐(0) 编辑
摘要: select from where order by 排序 LTRIM(字符串) 取消字符串左空格 RTRIM(字符串) 取消字符串右空格 阅读全文
posted @ 2016-12-22 10:11 clarklxr 阅读(73) 评论(0) 推荐(0) 编辑
摘要: bool b=a.contains(b);//a中是否包含b 阅读全文
posted @ 2016-12-21 21:17 clarklxr 阅读(79) 评论(0) 推荐(0) 编辑
摘要: string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); //取用户桌面路径 阅读全文
posted @ 2016-12-20 11:40 clarklxr 阅读(81) 评论(0) 推荐(0) 编辑
摘要: SqlConnection sqlcon =new SqlConnection( "Data Source=.;Initial Catalog=BGS;User ID=sa");//sql连接语句 sqlcon.Open(); //连接数据库 SqlDataAdapter sqladt = new 阅读全文
posted @ 2016-12-16 11:28 clarklxr 阅读(90) 评论(0) 推荐(0) 编辑
摘要: datagridview.Rows[].Cells[].value 取单元格值 datagridview.CurrentCell.RowIndex;是当前活动的单元格的行的索引DataGridView1.CurrentRow.Index 获得包含当前单元格的行的索引 datagridview.Sel 阅读全文
posted @ 2016-11-29 13:18 clarklxr 阅读(122) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Threading; private void swap(int x,int y) { y=interlocked.exchange(ref x,y); } //ref指定以原子操作的形式 // REF关键字百度百科http://baike.ba 阅读全文
posted @ 2016-10-28 10:17 clarklxr 阅读(475) 评论(0) 推荐(0) 编辑