上一页 1 ··· 14 15 16 17 18

2012年10月18日

asp.net 文件下载,有进度条

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RenameDownload.aspx.cs" Inherits="DownloadProxy.RenameDownload" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio 阅读全文

posted @ 2012-10-18 15:36 空明流光 阅读(595) 评论(0) 推荐(0) 编辑

asp.net ajax使用方法一

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace DownloadProxy{ public partial class RenameDownload : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { }... 阅读全文

posted @ 2012-10-18 09:34 空明流光 阅读(165) 评论(0) 推荐(0) 编辑

2012年10月9日

C#将中文词组处理成拼音

摘要: using System.Runtime.InteropServices;using System.Runtime.CompilerServices; [DllImport("ole32.dll")]public static extern int CLSIDFromString( [MarshalAs(UnmanagedType.LPWStr)] string lpsz, out Guid clsid); [DllImport("ole32.dll")]public static extern int CoCreateInstance( [In, Ma 阅读全文

posted @ 2012-10-09 14:55 空明流光 阅读(693) 评论(0) 推荐(0) 编辑

C# 应用微软的Visual Studio International Pack 类库提取汉字拼音首字母

摘要: 昨天经过网友提示,提取汉字拼音的办法可以应用微软的一个类库 Visual Studio International Pack ,今天试了一试,确切好用!下面分享下应用办法:起首下载Visual Studio International Pack 1.0,官方下载地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=44CAC7F0-633B-477D-AED2-99AEE642FC10&displaylang=zh-cn。下载完毕后解压,解压后可以发明7个MSI安装文件,此中CHSPinYinConv.msi 阅读全文

posted @ 2012-10-09 14:40 空明流光 阅读(226) 评论(0) 推荐(0) 编辑

2012年9月25日

c# 防早退提醒器

摘要: <?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings> <add key="WorkingStartTime" value="8:30" /> <add key="WorkingEndTime" value="17:30" /> <add key="WorkingHours" value="8&quo 阅读全文

posted @ 2012-09-25 13:54 空明流光 阅读(629) 评论(8) 推荐(0) 编辑

c# 关机、注销、重启代码

摘要: using System;using System.Text;using System.Diagnostics;using System.Runtime.InteropServices;namespace SystemManager{ /// <summary> /// 枚举类型,指定可以允许的重启操作 /// </summary> public enum RestartOptions { /// <summary> /// Shuts down all processes running in the security contex... 阅读全文

posted @ 2012-09-25 13:42 空明流光 阅读(480) 评论(0) 推荐(0) 编辑

C# 关机消息拦截的几种方法:

摘要: Microsoft.Win32.SystemEvents.SessionEnding += new Microsoft.Win32.SessionEndingEventHandler(SystemEvents_SessionEnding); protected override void WndProc(ref Message m) { const int WM_QUERYENDSESSION = 0x011; const int WM_ENDSESSION = 0x16; if (m.Msg == ... 阅读全文

posted @ 2012-09-25 11:15 空明流光 阅读(1117) 评论(0) 推荐(0) 编辑

2012年9月24日

c# 隐藏主窗体

摘要: protected override void OnShown(EventArgs e) { base.OnShown(e); this.Hide(); } 将上面一句写在form的类代码里,虽然开始会闪一下,但这是我搜到的最简单的代码。勉强可以用。如果配合 WindowStyle设置为Minimi 阅读全文

posted @ 2012-09-24 16:07 空明流光 阅读(190) 评论(0) 推荐(0) 编辑

使用WTSGetActiveConsoleSessionId()的VISTA服务与桌面交互

摘要: 转载自:http://blog.csdn.net/felixz/archive/2006/10/23/1346380.aspxWindows Vista 对快速用户切换,用户账户权限,以及服务程序所运行的会话空间都作了很大的改动,致使一些原本可以工作的程序不再能够正常工作了,我们不得不进行一些改进以跟上 Vista 的步伐。我们的软件在Windows NT/2000/XP/Vista 系统中安装了一个系统服务,这个服务负责以 SYSTEM 权限启动我们的主程序。我们的主程序启动后会在系统托盘添加一个图标,点击此图标可以弹出控制菜单,通过这个菜单也可以激活配置程序首选项的对话框。在 Windo. 阅读全文

posted @ 2012-09-24 15:47 空明流光 阅读(629) 评论(0) 推荐(0) 编辑

2012年9月15日

自定义配置节与XML反序列化并用

摘要: web.config<?xml version="1.0"?><configuration> <configSections> <section name="menus" type="XmlSerializerPlus.MenuSectionHandler"/> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" 阅读全文

posted @ 2012-09-15 09:28 空明流光 阅读(299) 评论(0) 推荐(0) 编辑

2012年9月14日

XML反序列化一例

摘要: <?xml version="1.0" encoding="utf-8" ?><htmlPages> <htmlPage name="home"> <cssList> <css name ="base.css"></css> <css name ="font.css"></css> </cssList> <javascripts> <javascript name=&qu 阅读全文

posted @ 2012-09-14 10:22 空明流光 阅读(303) 评论(0) 推荐(0) 编辑

2012年8月3日

c#读取带命名空间的xml

摘要: boolean var doc = new XmlDocument(); var namespaceManager = new XmlNamespaceManager(doc.NameTable); namespaceManager.AddNamespace("xsi", "http://w... 阅读全文

posted @ 2012-08-03 17:41 空明流光 阅读(245) 评论(0) 推荐(0) 编辑

WindowService 执行命令

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Linq;using System.ServiceProcess;using System.Text;using System.Threading;using System.Net.Sockets;using System.Net;namespace WindowsService1{ public partial class Adm... 阅读全文

posted @ 2012-08-03 14:28 空明流光 阅读(233) 评论(0) 推荐(0) 编辑

2012年8月2日

C#执行DOS命令(CMD命令) (转)

摘要: 在c#程序中,有时会用到调用cmd命令完成一些功能,于是在网上查到了如下方法,实现了 c#执行DOS命令,并返回结果。[csharp] view plaincopyprint? //dosCommand Dos命令语句 publicstring Execute(string dosCommand) { return Execute(dosCommand, 10); } /// <summary> /// 执行DOS命令,返回DOS命令的输出 /// </summary> /// <param name="dosCommand">dos命令 阅读全文

posted @ 2012-08-02 21:27 空明流光 阅读(399) 评论(0) 推荐(0) 编辑

C#中winform隐藏启动窗体及this.invoke匿名函数

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace CommandService{ public partial class Form1 : Form { public Form1() { ... 阅读全文

posted @ 2012-08-02 21:11 空明流光 阅读(926) 评论(0) 推荐(0) 编辑

C#UDP通信最简单一例

摘要: 接收端:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;namespace Server{ class Program { static void Main(string[] args) { var udpReceiver = new UdpClient(8112, AddressFamily.InterNetwork); ... 阅读全文

posted @ 2012-08-02 19:49 空明流光 阅读(393) 评论(1) 推荐(1) 编辑

2012年7月25日

自动查找并关闭窗口

摘要: Form1界面及VS生成代码:View Code namespace WindowCloser{ partial class Form1 { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if mana... 阅读全文

posted @ 2012-07-25 17:34 空明流光 阅读(491) 评论(0) 推荐(0) 编辑

2012年6月28日

简易类生成工具

摘要: namespace ClassGenerator{ partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /... 阅读全文

posted @ 2012-06-28 16:44 空明流光 阅读(304) 评论(0) 推荐(0) 编辑

2012年5月23日

自定义配置节备忘

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;namespace ClassGenerator.ConfigSection{ public class MyKeyValuePair : ConfigurationElement { public MyKeyValuePair() { } public MyKeyValuePair(string key, string... 阅读全文

posted @ 2012-05-23 17:53 空明流光 阅读(231) 评论(0) 推荐(0) 编辑

2010年10月20日

再谈 asp.net 客户端调用服务器端事件并传递参数

摘要: 之前在网上找了很久,也没有找到比较好的方法,大都说是通过后台接收 Request["__EventTarget"] 和 Request["__EventArgument"]来实现,可我总觉得上面的方法有点别扭。再或者就是在前端放置一个runat="server"的button控件,然后将控件的Vi... 阅读全文

posted @ 2010-10-20 16:51 空明流光 阅读(654) 评论(0) 推荐(0) 编辑

上一页 1 ··· 14 15 16 17 18

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示