上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 34 下一页
摘要: 前一阵在网上看到有网友想实现这样的功能。因此特写了这样一段代码。using System.Diagnostics;class Class1{/// <summary>/// 应用程序的主入口点。/// </summary>[STAThread]static void Main(string[] args){//创建一个新的进程对象Process myCmdProcess = new Process();//当进程退出时要处理的代码,注册一个事件myCmdProcess.Exited += new System.EventHandler(myCmdProcess_exit 阅读全文
posted @ 2005-02-18 08:56 greystar 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 异步操作可以使我们的程序获得更优的性能,特别是对大文件进行处理时,这一点相信大家都知道。这里我写了一个示例。希望能给大家一个帮助。using System.IO;using System.Threading;public class Form2 : System.Windows.Forms.Form{private System.Windows.Forms.Button button1;private System.Windows.Forms.TextBox textBox1;private System.Windows.Forms.ProgressBar progressBar1;FileS 阅读全文
posted @ 2005-02-17 09:43 greystar 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 现在有WEB程序大多都有很多排序及分页的功能。每次进行这些操作的时候,我们都要到服务器去一次数据。这里我使用XSL+XML的方式来演示一下,只从服务器取一次数据,缓存在客户端,然后客户端可以进行自己想要的操作。//这个文件的主要功能是从数据库里取出数据。然后转换成XML,传到客户端using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using S 阅读全文
posted @ 2005-02-17 09:19 greystar 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 在很多情况下我们可能都要使用异步调用WEBService。使用异步的好处是非阻塞方式进行的。当然也增加一定的编程难度。使用异步编程,我们可以实现对远程服务的调用,查询调用状态,或取消调用等功能。我们以代码实例为例来解说首先使用VS2k3建立一个WEBSERVICE ,假设是一个提供股票信息的服务。这里我处理的比较简单,仅是模拟一下服务调用需要很长的时间。namespace StockService{/// <summary>/// Service1 的摘要说明。/// </summary>public class StockPrice : System.Web.Serv 阅读全文
posted @ 2005-02-02 15:53 greystar 阅读(266) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/mtybeen/archive/2005/01/13/251195.aspx一条猎狗将兔子赶出了窝,一直追赶他,追了很久仍没有捉到。牧羊看到此种情景,讥笑猎狗说"你们两个之间小的反而跑得快得多。"猎狗回答说:"你不知道我们两个的跑是完全不同的!我仅仅为了一顿饭而跑,他却是为了性命而跑呀!"....目标....二这话被猎人听到了,猎人想:猎狗说的对啊,那我要想得到更多的猎物,得想个好法子.于是,猎人又买来几条猎狗,凡是能够在打猎中捉到兔子的,就可以得到几根骨头,捉不到的就没有饭吃.这一招果然有用,猎狗们纷纷去努力追 阅读全文
posted @ 2005-01-21 10:57 greystar 阅读(92) 评论(0) 推荐(0) 编辑
摘要: /*微软最高机密——Windows 98 源代码 项目:Chicago(tm) 项目发行日期:1998年夏天*/ #include "win31.h" #include "win95.h" #include "evenmore.h" #include "oldstuff.h" #include "billrulz.h" #define INSTALL = HARD char make_prog_look_big[1600000]; /*使程序看起来很大*/ void main() { while 阅读全文
posted @ 2005-01-18 16:07 greystar 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 计划任务描述将记事本计划为每星期一、星期三和星期五下午 12:30 运行。脚本代码strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!//" & strComputer & "/root/cimv2")Set objNewJob = objWMIService.Get("Win32_ScheduledJob")errJobCreat 阅读全文
posted @ 2005-01-18 15:44 greystar 阅读(219) 评论(0) 推荐(0) 编辑
摘要: <script language="VBScript">dim hkey_root,hkey_path,hkey_keyhkey_root="HKEY_CURRENT_USER"hkey_path="/Software/Microsoft/Internet Explorer/PageSetup"'//设置网页打印的页眉页脚为空function pagesetup_null()on error resume nextSet RegWsh = CreateObject("WScript.Shell" 阅读全文
posted @ 2005-01-18 14:36 greystar 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 使用DirectX技术实现播放,需要引用系统的 C:/WINNT/system32/quartz.dll是从CodeProject上看来的。前一阵看到有人需要这样的代码,所以贴出来共享一下。using System;using System.Collections;using System.ComponentModel;using System.Drawing;using System.Data;using System.Windows.Forms;using QuartzTypeLib;namespace Greystar.FrameWork.ToolKits{/// <summary 阅读全文
posted @ 2005-01-17 13:36 greystar 阅读(388) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Web.UI;using System.Web.UI.WebControls;using System.ComponentModel;using System.Collections.Specialized;namespace MyWebControls{/// <summary>/// 创建一个派生于WEBCONTROL的类/// 实现一个公有构造函数,它将调用基类构造函数来指定服务器控件应该输出一个input元素/// 重写AddAttributesToRender方法,调用该方法是为了允许派生类为根元素input 添加属性/ 阅读全文
posted @ 2005-01-14 16:27 greystar 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 34 下一页