- 博客(15)
- 收藏
- 关注
原创 datagrid 单击显示所在行数据事件
Private Sub DG2_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DG1.MouseUp Dim i As Integer Dim k As String i = DG2.CurrentRowIndex
2006-01-04 15:36:00
851
原创 C#中对注册表的操作 读写注册表方法
从注册表中读信息; 要读取的键值 读到的键值字符串,如果失败(如注册表尚无信息),则返回"" Private Function ReadInfo(ByVal p_KeyName As String) Dim SoftwareKey As RegistryKey = Registry.LocalMachine.OpenSubKey("Softw
2006-01-04 15:32:00
804
原创 treeview 遍历搜索 定位目标
Private Function Findnode(ByVal treelist As TreeNodeCollection) If treelist Is Nothing Then Return "" End If Dim nodex As TreeNode For Each nodex In treelist
2006-01-04 15:13:00
1080
原创 获取不同版本的DataRow
//获取不同版本的DataRowusing System;using System.IO;using System.Text;using System.Diagnostics;using System.Threading;using System.Collections;using System.Data;using System.Xml;using System.Management;using
2006-01-03 13:54:00
911
原创 获取客户端IP地址
public static string GetClientIP( System.Web.UI.Page page ) { string ipAddress = ""; if (page.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]==null) { ipAddress=page.Request.ServerVariable
2006-01-03 13:52:00
780
原创 ASP.NET(c#)中取得当前计算机CPU 内存使用率等相关信息
在Visual C#中调用API的基本过程: 首先,在调用API之前,你必须先导入System.Runtime.InteropServices这个名称空间。该名称空间包含了在Visual C#中调用API的一些必要集合,具体的方法如下: using System.Runtime.InteropServices; 在导入了名称空间后,我们要声明在程序中所要用到的API函数。
2006-01-03 13:51:00
2653
3
原创 取得剪贴板上的内容
private void button1_Click(object sender, System.EventArgs e) { // Create a new instance of the DataObject interface. IDataObject data = Clipboard.GetDataObject(); // If the data is text, then set the
2006-01-03 13:44:00
909
原创 access数据库插入图片
access数据库插入图片我这个是ACCESS数据库你参考一下//save pictureOleDbConnection mycnn=new OleDbConnection("provider=Microsoft.jet.oledb.4.0;data source=f://dazhu.mdb"); mycnn.Open(); OleDbCommand mycmd=new OleD
2005-06-12 20:56:00
2623
原创 SELECT 强查询
有一个表,关系为 Man(ID,Wife),其中的ID是唯一标示符,且一个ID对应的Wife可以有不同多个。表中的记录有很多,但是有的ID只对应一两个wife,而有的ID则对应几十个wife。问题是:能否把所有的记录排序,wife最少的ID记录排在所有记录的最上层,wife最多的ID排在最底部,即把每个 ID根据其wife的拥有量进行递增排序,并且group by ID。排好后的结果即如下所示:I
2005-06-12 20:55:00
613
原创 WEB Q A
Q:如何将WEB页面中的数据保存为一个word文件A:直接用word打开,然后存成.doc文件就可以了。protected void ConvertToHtml(string SrcFilePath,string TargetFilePath){ Word.Application app=new Word.Application(); app.Visible=false; Object o=
2005-06-12 20:54:00
842
原创 C#如何在Form中嵌入并且操作Excel表格
1)C#如何在Form中嵌入并且操作Excel表格 网上比较多讲述如何操作Excel表的文章,但都是启动Excel的窗口来打开Excel数据文件。有时候需要把Excel表嵌入到自己程序的Form中,给客户一个不用切换窗口的操作界面,似乎更好。这在VC中用OLE技术很容易实现,但是在C#中方法就不一样啦。下面将就此进行阐述。一、首先简要回顾一下如何操作Excel表先要添加对Excel的引用。选择项
2005-06-12 20:53:00
698
原创 ASP精华代码
·优快云总结的ASP精华代码 优快云总结的ASP精华代码 1.oncontextmenu="window.event.returnvalue=false"将彻底屏蔽鼠标右键no可用于Table 2.取消选取、防止复制3.onpaste="returnfalse"不准粘贴4.oncopy="returnfalse;"oncut="returnfalse;"防止复制5.IE地址栏前换成自己的图标
2005-06-12 20:52:00
616
原创 快速排序
using System;namespace QuickSorter{ public class QuickSorter { private void Swap(ref int l,ref int r) { int s; s=l; l=r; r=s; } public void Sort(int [] list,int low,int high) { int pivo
2005-06-12 20:51:00
809
原创 快速排序2
using System; namespace VcQuickSort { /// /// ClassQuickSort 快速排序。 /// 范维肖 /// public class QuickSort { public QuickSort() { } private void Swap(ref int i,ref int j) //swap two integer
2005-06-12 20:51:00
732
原创 排序问题
using System;namespace BasicSorter{ /// /// Class1 的摘要说明。 /// class Class1 { /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { // // TODO: 在此处添加代码以启动应用程序 // int[]
2005-06-12 20:49:00
626
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人