2004年10月14日

微软Tech·Ed 2004大会上提到的网络资源

摘要: 微软Tech·Ed 2004大会上提到的网络资源 综合资源:参加免费的聊天或在线广播活动:http://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asp 新闻组:http://communities2.microsoft.com/communitie... 阅读全文

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

《程序员》杂志社第六期

摘要: .NET Remoting 从COM(Component Object Model)时代到DCOM(Distributed COM),微软扮演了一个推动者的角色。如果说COM提供了一个Windows平台上的对象通讯技术,并且逐渐成为应用程序之间彼此通讯及互动的技术主流,那么DCOM则是解决了计算机的通信和互动技术。 COM的着眼点是在于同一台计算机上不同应用程序之间的通讯需求,跨到另外... 阅读全文

posted @ 2004-10-14 17:20 LEE 阅读(190) 评论(0) 推荐(0) 编辑

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) 编辑

带图片的,多列的DropDownList的实现

摘要: 带图片的,多列的DropDownList的实现 WebDropDownList.aspx 模拟下拉列表框模拟下拉框 请选择? 6 {0}"> 北京市上海市河南省深圳市大连市云南省 WebDropDownList.aspx.cs using System;using System.Collections;using System.ComponentModel;using System.... 阅读全文

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

XMLHTTP下载文件

摘要: 利用XMLHTTP下载文件和以前的方法一样,先添加引用-COM-Microsoft Xml 3.0,然后在代码开始处写:using MSXML2; 下面就是主要的代码:private void Page_Load(object sender, System.EventArgs e) { string Url = "http://dotnet.aspx.cc/Images/logoSite.g... 阅读全文

posted @ 2004-10-14 10:12 LEE 阅读(278) 评论(0) 推荐(0) 编辑

c#关机

摘要: 你可以这样来实现:(支持Win XP下的关机)using System.Runtime.InteropServices; [StructLayout(LayoutKind.Sequential, Pack=1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int A... 阅读全文

posted @ 2004-10-14 08:53 LEE 阅读(1634) 评论(0) 推荐(0) 编辑

远程启动

摘要: 这里是个远程启动的例子,参考一下吧using System ; using System.Drawing ; using System.Collections ; using System.ComponentModel ; using System.Windows.Forms ; using System.Data ; using System.Management ; ... 阅读全文

posted @ 2004-10-14 08:52 LEE 阅读(498) 评论(0) 推荐(0) 编辑

导航