
WinForm
文章平均质量分 55
acewang
这个作者很懒,什么都没留下…
展开
-
一个关于IIS的类
Imports System Imports System.DirectoryServices Imports System.IO Public Class IISManager Public Shared Function CreateWebSite(ByVal webSiteName As String, ByVal pathToRoot As String) As WebSite原创 2004-02-13 11:28:00 · 990 阅读 · 0 评论 -
停止或开启系统服务
using System; using System.Management; namespace ArLi.CommonPrj { public class PLMM007_WMI { public static readonly System.Version myVersion = new System.Version(1,1);原创 2004-07-29 18:10:00 · 1531 阅读 · 0 评论 -
怎样用C#打开Word文档
object fileName = Environment.CurrentDirectory+"//example3"; object optional=Missing.Value;#if OFFICEXP _Document doc = app.Documents.Open2000( ref fileName,#else _Document doc = app.Document原创 2004-07-29 12:33:00 · 3783 阅读 · 0 评论 -
停止或开启系统服务-续(远程调用)
using System; using System.Management; namespace ArLi.CommonPrj { public class Service_WMI { public static readonly System.Version myVersion = new System.Version(1,1);原创 2004-08-02 10:21:00 · 1536 阅读 · 0 评论 -
取得局域网内的所有数据库服务器列表
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; ? using SQLDMO; ? namespace TestSQLDMO { ?????? /// ?????? //原创 2004-08-02 10:17:00 · 1318 阅读 · 0 评论 -
Word中画表格
Word.Table oTable; Word.Range wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range; oTable = oDoc.Tables.Add(wrdRng, 3, 5, ref oMissing, ref oMissing); oTable.Range.ParagraphForm原创 2004-08-02 10:04:00 · 1709 阅读 · 0 评论 -
获取本地主机IP地址
String strHostName = Dns.GetHostName(); IPHostEntry iphostentry = Dns.GetHostByName(strHostName); int nIP = 0; foreach(IPAddress ipaddress in iphostentry.AddressList) { Console.WriteLine原创 2004-07-29 12:53:00 · 1825 阅读 · 3 评论 -
访问局域网资源
private void button1_Click(object sender, System.EventArgs e) { ConnectionOptions co = new ConnectionOptions(); co.Username = "Administrator";原创 2004-08-02 10:18:00 · 1992 阅读 · 0 评论 -
将数据库压缩同时设置密码
引用Microsoft Jet and Rel.........,dll名为msjro.dll ... 然后using JRO; JetEngine x = new JetEngine(); x.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e://db.mdb;Jet OLEDB:Database Password=1原创 2004-08-02 10:03:00 · 1246 阅读 · 0 评论 -
访问远程access数据库总弹出的对话框
---比如有a、b两台机子,在a机上有access数据库,共享在//a//exam//水位.mdb 。 现在在b机编写程序访问之。conn = new OleDbConnection();conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=//a//exam//水位.mdb ";conn.Open();---原创 2004-07-29 12:46:00 · 1309 阅读 · 0 评论 -
用Visual C#创建Windows服务程序
参考:用Visual C#创建Windows服务程序http://www.vchome.net/dotnet/dotnetdocs/dotnet38.htm注意安装时安装类里面选择的用户是LocalSystem-------------------------------------------------------------------------- 用Visual C#创建Windows原创 2004-07-29 12:42:00 · 1513 阅读 · 0 评论 -
请问在C/S系统中如何设置配置文件
System.Configuration.ConfigurationSettings.GetConfig("ApplicationConfiguration");orRuntime Web.config / App.config Editing http://www.eggheadcafe.com/articles/20030907.asp-----------------------------原创 2004-07-29 12:35:00 · 1156 阅读 · 0 评论 -
如何在.NET框架下创建Access数据库和表
HOW TO: Create an Access Database Using ADOX and Visual C# .NEThttp://support.microsoft.com/default.aspx?scid=kb;EN-US;317881原创 2004-07-29 12:32:00 · 1007 阅读 · 1 评论 -
获取CPU的ID码
public static string GetCPUId() { string cpuInfo = String.Empty; string temp=String.Empty; ManagementClass mc = new Manage原创 2004-08-02 10:17:00 · 1980 阅读 · 0 评论 -
如何使用 Visual C# .NET 检查 Windows 版本[转]
获取 Windows 版本数据获取 Windows 系统信息判断平台判断 Windows 95, Windows 98, Windows 98 第二版或 Windows Me 的版本判断 Windows NT, Windows 2000, 或 Windows XP 的版本编译样例 -----------------------------------------------------------原创 2004-07-29 17:55:00 · 1009 阅读 · 0 评论 -
使用WMI获得硬盘的信息
首先,什么是WMI? WMI(Windows管理架构:Windows Management Instrumentation)是Microsoft基于Web的企业管理(WBEM)和 Desktop Management Task Force(DMTF)工业标准的实现. 就是一种基于标准的系统管理的开发接口,这组接口用来控制管理计算机. 它提供了一种简单的方法来管理和控制系统资源. 如果你想原创 2004-02-05 00:50:00 · 1300 阅读 · 0 评论 -
关于硬盘序列号的类
using System;using System.IO;using System.Runtime.InteropServices;using System.Text;using Microsoft.Win32;namespace Wjb.ReadOrWriteIniAndReg{ /// /// HardDiskVal 的摘要说明。 /// 读取指定盘符的硬盘序列号原创 2004-03-08 10:00:00 · 1022 阅读 · 0 评论 -
保证应用程序只有一个实例在运行
[C#] public static Process RunningInstance() { Process current = Process.GetCurrentProcess(); Process[] processes = Process.GetProcessesByName (curren原创 2004-02-05 00:44:00 · 1536 阅读 · 0 评论 -
使用DirectoryServices给文件添加访问权限
using System;using System.Collections;using ActiveDs;namespace PardesiServices.FixFilePermission{ class FileSecurity { [STAThread] static void Main(string[] args) { string strFile =原创 2004-08-10 17:25:00 · 1505 阅读 · 0 评论