2004年10月20日

Cache浏览器

摘要: <!--StartFragment--><%@ Page Language="C#" EnableViewState = "true"%><%@ import Namespace="System" %><%@ import Namespace="System.Configuration" %><%@ import Namespace="Syst... 阅读全文

posted @ 2004-10-20 13:54 LEE 阅读(263) 评论(0) 推荐(0) 编辑

2004年10月14日

c#中图片合并后保存的问题

摘要: pictureBox1.Image=Image.FromFile(@"E:\1.bmp");Graphics g=Graphics.FromImage(pictureBox1.Image);Pen p=new Pen(Color.Black,5);g.DrawLine(p,0,0,50,100); //这里可以画你的第二幅图片pictureBox1.Refresh();pictureBox1.Im... 阅读全文

posted @ 2004-10-14 16:37 LEE 阅读(1331) 评论(0) 推荐(0) 编辑

设置代理。

摘要: 设置代理。访问http://www.webservicex.net/globalweather.asmx时vs.net的生成的代理类的代码:其中System.Net.WebProxy myProxy=new System.Net.WebProxy("192.1.1.1",8080); this.Proxy=myProxy;就是设置代理服务器的代码[System.Diagnostics.Debugg... 阅读全文

posted @ 2004-10-14 16:34 LEE 阅读(376) 评论(0) 推荐(0) 编辑

如何在2000和XP下添加用户

摘要: 如何在2000和XP下添加用户A;private void AddUser(string strDoamin, string strLogin, string strPwd){ DirectoryEntry obDirEntry = null; try { obDirEntry = new DirectoryEntry("WinNT://" + strDoamin); DirectoryEntri... 阅读全文

posted @ 2004-10-14 16:33 LEE 阅读(1674) 评论(0) 推荐(0) 编辑

远程重启计算机

摘要: Q:远程重启计算机A;ConnectionOptions options = new ConnectionOptions ( ) ; options.Username ="administrator"; options.Password = "" ; ManagementScope scope = new ManagementScope( "\\\\" + "10.5.0.5" + "\\root... 阅读全文

posted @ 2004-10-14 16:33 LEE 阅读(924) 评论(0) 推荐(0) 编辑

如何使用系统蜂鸣器

摘要: Q:如何使用系统蜂鸣器首先,您需要添加Microsoft Visual Basic .NET Runtime(Microsoft.VisualBasic.dll),方法如下:Project->Add Reference->.NET->Microsoft Visual Basic .NET Runtime然后只要在需要蜂鸣的地方调用:Microsoft.VisualBasic.In... 阅读全文

posted @ 2004-10-14 16:32 LEE 阅读(687) 评论(0) 推荐(0) 编辑

读注册表

摘要: public static string GetPath(){string sPath;RegistryKey lRk_Path;lRk_Path = Registry.CurrentUser;//打开software目录RegistryKey software = lRk_Path.OpenSubKey("Software");RegistryKey odbc = software.OpenSu... 阅读全文

posted @ 2004-10-14 16:31 LEE 阅读(359) 评论(0) 推荐(0) 编辑

截系统热键

摘要: Q;截系统热键A;public class Win32Hook{[DllImport("kernel32")]public static extern int GetCurrentThreadId();[DllImport( "user32", CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]public stat... 阅读全文

posted @ 2004-10-14 16:30 LEE 阅读(442) 评论(0) 推荐(0) 编辑

有的网站的相关内容必须要在登录后才可以查看,其登录信息保存在session变量之中。这样,使用asphttp等组件就难以正确得到所要的信息。

摘要: 有的网站的相关内容必须要在登录后才可以查看,其登录信息保存在session变量之中。这样,使用asphttp等组件就难以正确得到所要的信息。 A:使用asp.net中的httprequest和httpresponse来实现。要点:1。 通过附加一个cookiecontainer到httprequest对象中,可以得到登录后返回的代表SESSION ID的COOKIE。 见Login方法2。 将此C... 阅读全文

posted @ 2004-10-14 16:28 LEE 阅读(466) 评论(0) 推荐(0) 编辑

存图片到数据库

摘要: Q:存图片到数据库A:using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Data.SqlClient; using System.IO; names... 阅读全文

posted @ 2004-10-14 16:27 LEE 阅读(621) 评论(0) 推荐(0) 编辑

C#捕捉视频

摘要: Q:C#捕捉视频\A:using System;using System.Runtime.InteropServices;namespace Wuyin.ShoesManager{ /// <summary> /// VedioCapture 的摘要说明。 /// </summary> public class VedioCapture { private int hCap... 阅读全文

posted @ 2004-10-14 16:26 LEE 阅读(881) 评论(1) 推荐(0) 编辑

C#中调用WIN32 API实现对光驱的操作

摘要: Q:C#中调用WIN32 API实现对光驱的操作A:using System; using System.Text;using System.Windows.Forms;using System.Drawing;using System.Runtime.InteropServices;class CDRomControler:Form{ [DllImport( "winmm.dll", Entry... 阅读全文

posted @ 2004-10-14 16:25 LEE 阅读(591) 评论(0) 推荐(0) 编辑

等待外部程序运行结束以后 主程序再继续运行

摘要: Q:等待外部程序运行结束以后 主程序再继续运行A:System.Diagnostics.Process p = Process.Start("IExplore.exe", "www.northwindtraders.com");p.WaitForExit();if(p.ExitCode==0)//正常退出{...} 阅读全文

posted @ 2004-10-14 16:24 LEE 阅读(600) 评论(0) 推荐(0) 编辑

用GDI+怎么实现绘制倾斜文字

摘要: Q:用GDI+怎么实现绘制倾斜文字A:Graphics g = this.CreateGraphics();g.RotateTransform(30f);g.DrawString("倾斜ABCabc", this.Font, SystemBrushes.WindowText, 10f, 10f);g.ResetTransform();g.Dispose();g = null; 阅读全文

posted @ 2004-10-14 16:23 LEE 阅读(671) 评论(0) 推荐(0) 编辑

如何将WEB页面中的数据保存为一个word文件

摘要: 如何将WEB页面中的数据保存为一个word文件protected void ConvertToHtml(string SrcFilePath,string TargetFilePath){ Word.Application app=new Word.Application(); app.Visible=false; Object o=Missing.Value; object docFile=Sr... 阅读全文

posted @ 2004-10-14 16:22 LEE 阅读(558) 评论(0) 推荐(0) 编辑

导航