随笔分类 -  C#

摘要:/// <summary> /// 开机启动项 . /// </summary> /// <param name="Started">是否启动</param> /// <param name="name">启动值的名称</param> /// <param name="path">启动程序的路径</param> public void RunWhenStart(bool Started, string name, string path) 阅读全文
posted @ 2013-03-11 10:27 指尖的流星 阅读(191) 评论(0) 推荐(0)
摘要:[DllImport("user32.dll")] static extern bool SystemParametersInfo(uint uiAction, bool uiParam, ref bool pvParam, uint fWinIni); const uint SPI_GETSCREENSAVEACTIVE = 0x0010; const uint SPI_SETSCREENSAVEACTIVE = 0x0011; const uint SPIF_SENDCHANGE = 0x0002; const uint SPIF_SENDWININICHANGE = 阅读全文
posted @ 2013-03-11 10:24 指尖的流星 阅读(364) 评论(0) 推荐(0)
摘要:/// <summary> /// 增加换肤菜单 /// </summary> /// <param name= "toolMenu "> </param> public void AddSkinMenu(ToolStripMenuItem toolMenu) { DataSet skin = new DataSet(); try { skin.ReadXml("skin.xml ", XmlReadMode.Auto)... 阅读全文
posted @ 2013-02-20 10:13 指尖的流星 阅读(2451) 评论(0) 推荐(0)
摘要:From窗体的内容private bool isMouseDown = false; private Point FormLocation; //form的location private Point mouseOffset; //鼠标的按下位置 private int xPosition, yPosition; //声明委托 delegate void DisposeForm(); delegate void SetForm(double value); public frm... 阅读全文
posted @ 2013-01-30 12:00 指尖的流星 阅读(570) 评论(0) 推荐(0)
摘要:class AutoSizeFormClass { //(1).声明结构,只记录窗体和其控件的初始位置和大小。 public struct controlRect { public int Left; public int Top; public int Width; public int Height; } //(2).声明 1个对象 //注意这里不能使用控件列表记录 List<Control> nCtrl;,因为控件的关联性,记录的始终是当前的大小。 public List<controlRect> oldCtrl; //int ctrl_first = 0; // 阅读全文
posted @ 2013-01-29 08:34 指尖的流星
摘要:这个是也从网上搜索的代码,稍微改动了一个错误地方。usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Drawing.Printing;usingSystem.Windows.Forms;usingSystem.IO;usingSystem.Drawing;usingSystem.Data;namespaceOrderPDA.OrderCode{internalclassPrintService{publicPrintService(){}#regionMembers//成员publicStringp 阅读全文
posted @ 2012-11-09 15:50 指尖的流星 阅读(4921) 评论(0) 推荐(0)
摘要:C#天气预报WebService 阅读全文
posted @ 2012-09-25 15:02 指尖的流星 阅读(1413) 评论(0) 推荐(0)
摘要:// Get default databaseDatabase database = DatabaseFactory.CreateDatabase();// Read all the customers in a datasetstring selectSql = "SELECT * FROM Customers";DataSet customerDataSet = database. ExecuteDataSet(CommandType.Text, selectSql);// Modify Recordsforeach (DataRow dr in customerDat 阅读全文
posted @ 2011-05-09 18:26 指尖的流星 阅读(1505) 评论(0) 推荐(0)
摘要:#region Method for ExcelFileIsOpen //Excle文件是否打开判断 /// <summary> /// Excle文件是否打开判断 /// </summary> /// <param name="excelFileName">Excle文件名称(不包含路径)</param> /// <returns></returns> public bool ExcelFileIsOpen(string excelFileName) { bool result = false; // 阅读全文
posted @ 2011-05-09 08:51 指尖的流星 阅读(276) 评论(0) 推荐(0)