随笔分类 -  C#

编译自己的资源文件编辑器(reseditor.exe)
摘要:vs.net2003 本身带了一个资源文件编辑软件(ResEditor.exe),但默认没有编绎,不能使用。下面是我编绎这个工具的过程: 1.找到reseditor这个目录。一般在“Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Tutorials\resourcesandloca... 阅读全文

posted @ 2005-04-16 21:57 阅读(1093) 评论(0) 推荐(0)

把数字换成大写钱币的函数
摘要:public static void FloatTransform(string strNum,ref string result) { string strInt; string strFloat; strInt=strNum.Substring(0,strNum.IndexOf(".",0));//整数部分的值 strFloat=strNum.Substring((strNum.IndexOf... 阅读全文

posted @ 2005-03-28 14:41 阅读(1162) 评论(0) 推荐(0)

DataTable,DataView和DataGrid中一些容易混淆的概念
摘要:引用: http://pdriver.com/blog/tommy/archive/2005/01/06/5524.aspx 阅读全文

posted @ 2005-03-16 16:51 阅读(336) 评论(0) 推荐(0)

判断输入的是否是数字函數
摘要:#region 判断输入的是否是数字函數 /// /// 名称:IsNumberic /// 功能:判断输入的是否是数字 /// 参数:string oText:源文本 /// 返回值: bool true:是 false:否 /// public static bool IsNumberic(string oText){ System.Text.RegularExpressions.Reg... 阅读全文

posted @ 2005-03-14 18:52 阅读(595) 评论(0) 推荐(0)

如何在C#代码中实现在Sqlserver2000中添加用户?以及附加数据库?
摘要:用系统存储过程Sp_attach_db 来附加数据库; 用系统存储过程sp_addlogin 来新增帐号 添加用户: public bool AddUser(string cUserName,string Password,string DB) { System.Data.SqlClient.SqlConnection oCon=new System.Data.SqlClient.SqlC... 阅读全文

posted @ 2005-03-14 18:50 阅读(823) 评论(0) 推荐(0)

编译自己的资源文件编辑器(reseditor.exe)
摘要:vs.net2003 本身带了一个资源文件编辑软件,但默认没有编绎,不能使用。下面是我编绎这个工具的过程: 1.找到reseditor这个目录。一般在“ Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Tutorials\resourcesandlocalization\reseditor” 2.resed... 阅读全文

posted @ 2005-03-14 10:39 阅读(1345) 评论(1) 推荐(0)

INI文件格式及其操作代码
摘要:INI文件格式如下: [Database] server=wlq database=mydatabase uid=sa pwd=123456 说明:(有4个key) Section为:Database Key为:server database uid pwd /***************代码******************/ using System; using System.IO;... 阅读全文

posted @ 2005-01-26 11:30 阅读(12701) 评论(0) 推荐(0)

未处理的异常:进程性能计数器已禁用
摘要:调试出错: 未处理的异常: System.InvalidOperationException: 进程性能计数器已禁用,因此无法执行所请求的操作 问题解决:修改注册表信息 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance 下面的键值Disable Performance Counters 设置... 阅读全文

posted @ 2005-01-26 11:30 阅读(2976) 评论(4) 推荐(0)

C#中调用DLL文件
摘要:用DllImportAttribute直接调用 using System.Runtime.InteropServices; [DllImport("KERNEL32.DLL", EntryPoint="MoveFileW", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true, CallingConvention=C... 阅读全文

posted @ 2005-01-26 11:29 阅读(772) 评论(0) 推荐(0)

dataGrid 的使用
摘要:MessageBox.Show ("Col is " + DataGrid1.CurrentCell.ColumnNumber + ", Row is " + DataGrid1.CurrentCell.RowNumber + ", Value is " + DataGrid1[DataGrid1.CurrentCell] ); http://www.cnblogs.com/fellowche... 阅读全文

posted @ 2005-01-26 11:28 阅读(458) 评论(0) 推荐(0)

导航