上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: 在文档中需要输入带圈序号的地方输入246a,然后选中246a按“Alt+X”键,输入的246a就变或了“11”。同样,我们如果输入246b,按照上述方法,即可变成“12”。对照下表,我们就可以轻松输入11~20的带圈序号了。 我以前也不会,上班的时候,公司会计教的,财务部的都会 阅读全文
posted @ 2013-01-24 17:17 Asa.Zhu 阅读(1315) 评论(2) 推荐(0) 编辑
摘要: 1引用log4jNet.dll2在AssemblyInfo.cs中增加[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension = "config", Watch = true)] 3.1在App.config中在<configSections>节点中增加<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net-net-1.0"/&g 阅读全文
posted @ 2013-01-19 11:13 Asa.Zhu 阅读(305) 评论(0) 推荐(0) 编辑
摘要: string typeName = this.GetType().ToString();//空间名.类名string typeName = this.GetType().Name;//类名new System.Diagnostics.StackTrace().GetFrame(0).GetMethod().Name 方法名--------------------------------------------------------- 01 //测试日志 02 protected void writeerror(object sender, EventArgs e) 03 { 04 st... 阅读全文
posted @ 2013-01-18 16:43 Asa.Zhu 阅读(17598) 评论(0) 推荐(1) 编辑
摘要: 打开你的VS,然后禁用实时调试在“工具”菜单中单击“选项”,选择“调试”文件夹,选择“实时”页,清除相关的程序类型:“托管”、“本机”、“脚本”。 单击“确定” 阅读全文
posted @ 2012-12-26 16:58 Asa.Zhu 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 方法一:传值最先想到的,Form2构造函数中接收一个string类型参数,即Form1中选中行的文本,将Form2的TextBox控件的Text设置为该string,即完成了Form1向Form2的传值。当Form2的AcceptChange按钮按下,需要修改Form1中ListBox中相应列的值,因此可以考虑同时将Form1中的ListBox控件当参数也传入Form2,所有修改工作都在Form2中完成,根据这个思路,Form2代码如下:public partial class Form2 : Form{private string text;private ListBox lb;privat 阅读全文
posted @ 2012-12-06 15:14 Asa.Zhu 阅读(7276) 评论(0) 推荐(0) 编辑
摘要: #region//开机自动运行 private void CB_Auto_CheckedChanged(object sender, EventArgs e) {//CB_Auto是一个Checkbox,IsAutoRun 是个布尔变量,用于控制是否开机运行 if (CB_Auto.Checked == true) IsAutoRun = true; else IsAutoRun = false; try { AutoRun(); } catch { } } private void AutoRun() { //获取程序执行路径.. string starupPath = Applicati. 阅读全文
posted @ 2012-12-06 15:13 Asa.Zhu 阅读(4133) 评论(1) 推荐(1) 编辑
摘要: (一) 使用动态创建的方法 首先创建 Excel 对象,使用ComObj: var ExcelApp: Variant; ExcelApp := CreateOleObject( 'Excel.Application' ); 1) 显示当前窗口: ExcelApp.Visible := True; 2) 更改 Excel 标题栏: ExcelApp.Caption := '应用程序调用 Microsoft Excel'; 3) 添加新工作簿: ExcelApp.WorkBooks.Add; 4) 打开已存在的工作簿: ExcelApp.WorkBooks.Ope 阅读全文
posted @ 2012-12-06 15:00 Asa.Zhu 阅读(6630) 评论(0) 推荐(0) 编辑
摘要: 1.this.Close(); 只是关闭当前窗口,若不是主窗体的话,是无法退出程序的,另外若有托管线程(非主线程),也无法干净地退出;2.Application.Exit(); 强制所有消息中止,退出所有的窗体,但是若有托管线程(非主线程),也无法干净地退出;3.Application.ExitThread(); 强制中止调用线程上的所有消息,同样面临其它线程无法正确退出的问题;4.System.Environment.Exit(0); 这是最彻底的退出方式,不管什么线程都被强制退出,把程序结束的很干净。 阅读全文
posted @ 2012-12-06 14:59 Asa.Zhu 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 读写ini文件using System;using System.Collections.Generic;using System.Text;namespace HYInstall{ class IniFile { // 声明INI文件的写操作函数 WritePrivateProfileString() [System.Runtime.InteropServices.DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key, s 阅读全文
posted @ 2012-12-06 14:58 Asa.Zhu 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 第一种方法:System.Diagnostics.ProcessStartInfo info =new System.Diagnostics.ProcessStartInfo(path);info.WorkingDirectory = Path.GetDirectoryName(path); System.Diagnostics.Process.Start(info); 第二中方法:System.Diagnostics.Process.Start(path)第三种方法:Process p =new Process();p.StartInfo.FileName ="cmd.exe&qu 阅读全文
posted @ 2012-12-06 14:58 Asa.Zhu 阅读(22909) 评论(2) 推荐(2) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页