摘要: private void ProjectInstaller_AfterInstall(object sender, InstallEventArgs e) { try { Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.UseShellExecute = false; p.StartInfo.Redi... 阅读全文
posted @ 2010-04-12 15:37 94cool 阅读(379) 评论(0) 推荐(0)
摘要: from:http://www.cnblogs.com/joejoe/archive/2009/05/09/1453250.html描述:在自己写的一个系统服务程序,需要经常用到“允许与桌面进行交互”的设置,网上很多使用修改注册表的形式实现,我测试过,修改注册表后,选中的勾是选上了,但不能弹出应用程序;据说重启电脑后可以,但我不想重启,实际应用也不允许重启,故没有测试重启是... 阅读全文
posted @ 2010-04-12 15:09 94cool 阅读(7937) 评论(0) 推荐(0)
摘要: .NET验证码页出现如果下错误.处理方法.登录Server Error in '/' Application. --------------------------------------------------------------------------------Unable to make the session state request to the session state se... 阅读全文
posted @ 2010-04-12 14:06 94cool 阅读(254) 评论(0) 推荐(0)
摘要: 默认情况下,首次运行 ClickOnce 应用程序时,会下载该应用程序中包含的所有程序集。但是一些特殊的场景我们可能不希望它这么干,而是希望按照一定规测或者需要用到某个组件的时候再下载。比如我们可能会有下面一些应用场景的需求:1、我开发的这个客户端程序是要收费的。但是免费用户也可以使用部分功能。我在技术实现上把收费用户使用的功能封装到了A.dll 组件了,我希望免费用户根本无法获得A.dll,只有... 阅读全文
posted @ 2010-03-31 17:08 94cool 阅读(283) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;using System.IO;using System.Data.SqlClient;namespace WinApp{ public class Sequence { [DllImport("k... 阅读全文
posted @ 2010-03-30 11:43 94cool 阅读(1102) 评论(0) 推荐(0)
摘要: 1:[DllImport("Kernel32.dll")]public static extern UInt32 GetTickCount();private void int GetVal(){UInt32 Start = GetTickCount(); { //doing.......}UInt32 End = GetTickCount();return (End - Start);}2:Da... 阅读全文
posted @ 2010-03-29 17:26 94cool 阅读(213) 评论(0) 推荐(0)
摘要: from :http://blog.csdn.net/yuanhuiqiao/archive/2010/01/28/5264480.aspx内存泄露发生了怎么办?如何预防内存泄露的发生?我的经验是解决内存泄露的根本办法是编码时有预防意识。 目录1.内存泄露 1.1怎样才算是发生了内存泄露 1.2判断工具(perfmon.msc) 1.2.1perfmon.msc的使用 1.2.2一些重要的性能计数... 阅读全文
posted @ 2010-03-25 15:01 94cool 阅读(220) 评论(0) 推荐(0)
摘要: vs2005的中文bug :1:无法生成“[DesktopFolder]”中名为“用户桌面 的快捷方式”的快捷方式在生成安装项目时报错2:在进行安装项目时候,创建快捷方式并且设置了 ico文件, 出现了错误 :无法生成“[DesktopFolder]”中名为“用户桌面 的快捷方式原因:发现ico路径不能带有中文 阅读全文
posted @ 2010-03-23 16:53 94cool 阅读(468) 评论(0) 推荐(0)
摘要: public static string UrlScheme { get { return System.Web.HttpContext.Current.Request.Url.Scheme + "://"; } } public static string AppUrl { get { if (!String.IsNullOrEmpty(_AppUrl)) { return _AppUrl; }... 阅读全文
posted @ 2010-03-21 18:22 94cool 阅读(240) 评论(0) 推荐(0)
摘要: 在asp.net中执行应用程序有两种方法:1、调用win32函数ShellExecute。2、用.NET Framework中的Process类。下面我分别用这两种方法执行Windows中的记事本程序notepad.exe。新建一个ASP.Net页面Default.aspx,在上面放一个按钮,进入Default.aspx.cs页面填写后台处理程序。1、调用win32函数ShellExecute。添... 阅读全文
posted @ 2010-03-21 18:20 94cool 阅读(220) 评论(0) 推荐(0)