自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 GC 回收

环境:操作系统:WIN2003开发环境:C#。NET目的:对象型、值型、字符串型、图片、COM等在内存方面占用率进行分析。 用例一:一个类(test)里定义了6个字符串、每个付值为“22222”,4个窗体对象。循环1000次定义该类(test)的对象。结果:调用了释放方法:18.168~18.452否                   : 18.051~18.

2007-03-22 18:46:00 652

原创 弹出窗体

//确保窗口没有被最小化或最大化   ShowWindowAsync (ptr , WS_SHOWNORMAL);   //设置真实例程为foreground window   SetForegroundWindow (ptr);[DllImport("User32.dll")]  public static extern bool ShowWindowAsync(   IntPtr

2006-04-06 12:12:00 1122

原创 全国各省/市/民族

 ///  /// 所有城市  /// 整理:周李初 /// 日期:2006年3月10日 /// 使用说明:jy_controls.AllArea.AllObj.所有城市.导出XML(@"F:/bb.xml");导出中国所有的城市 /// jy_controls.AllArea.所有省或洲.吉林省.所有城市.导出XML(@"F:/ca.xml");导出吉林省的所有城市,且返回一个datatable

2006-04-06 10:26:00 4972

原创 进程间的通信

using System.Runtime.InteropServices;//添加引用public struct COPYDATASTRUCT//信息结构 {  public IntPtr dwData;  public int cbData;  [MarshalAs(UnmanagedType.LPStr)] public string lpData; }const int WM_COP

2006-04-05 21:04:00 1093

原创 接受树节点拖拽的listview

using System;using System.Windows.Forms;using System.Drawing;using System.IO;using System.Runtime.InteropServices;namespace jy_controls{ ///  /// jyListview 的摘要说明。 ///  public class jyListview : Syste

2006-03-29 11:10:00 1054

原创 ListView翻页算法

private void listpageup_Click(object sender, System.EventArgs e)  {   int lines = this.listView1.TopItem.Index;   lines = lines-(this.listView1.Height/this.listView1.TopItem.Bounds.Height-1);   if(lin

2006-03-28 13:25:00 1326

原创 RichTextBox的翻页算法

[System.Runtime.InteropServices.DllImport("user32.dll")]  public static extern int SendMessage (IntPtr hwnd, int wMsg, int wParam, int lParam);private void pagedownt_Click(object sender, System.Even

2006-03-28 13:24:00 2118

原创 下载与更新

private void DownLoadFile()  {         try   {        //    string ophos = "&OPHOS=OPHOS";    //    string opcd = "&OPCD=OPCD";    string ophos = "";    string opcd = "";    string FileURL = ImageURL

2006-03-24 17:20:00 1195

原创 C#的双缓存技术

protected override void OnPaint(PaintEventArgs e)  {   System.Drawing.Bitmap b = new Bitmap(this.Width,this.Height);//双缓冲技术,先将所有要画的画在该图片中,再调用GS画出该图片.   Graphics g = Graphics.FromImage((System.Drawing.

2006-03-24 15:31:00 1679

原创 接受拖拽的richtextbox

public class zlcRichtextBox : RichTextBox {public zlcRichtextBox()   {}public delegate void mDrag(object e);  public event mDrag DragDrop;///   /// 拖拽  ///   ///   protected override void OnDrag

2006-03-24 13:27:00 1090

原创 一个拖拽树控件

using System;using System.Windows.Forms;using System.Drawing;using System.IO;using System.Runtime.InteropServices;namespace jy_controls{ /// ; /// jyTreeView 的摘要说明。 ///  public  class jyTreeViewA : Sy

2006-03-24 08:59:00 1554

原创 去掉树控件的水平滚动条

[DllImport("user32.dll")]  static extern bool ShowScrollBar(IntPtr hWnd, int wBar, bool bShow);  int SB_HORZ = 0;重载树控件在构造函数里调用ShowScrollBar(this.Handle,SB_HORZ,false);或者在窗体调用ShowScrollBar(tr

2006-03-23 12:52:00 885

原创 制作托盘闪烁

using System;using System.Drawing;using System.Windows.Forms;using System.ComponentModel;using System.Collections;using System.IO;using System.Xml;using System.Text;using System.Runtime.InteropService

2006-03-20 12:38:00 1168

原创 在网页中调用应用程序

此问题我曾经也在一些论坛中问过,但是都没有得到答案.后来自己找研究了一些例子得到以下方法:HKEY——CLASSES——ROOT增加一项(应用程序的名字)——Shell—— Open—— Command在应用程序名字下增加字符串 URL Protocol ;修改Command里面的默认值的数据为 应用程序的安装路径和执行文件的名字,如:“ ”c:/program/shangwutong/s

2006-03-18 09:49:00 2854 3

原创 一个只能输入数字的TEXTBOX

public class TextBoxNum : System.Windows.Forms.TextBox {  public TextBoxNum()  {   //   // TODO: 在此处添加构造函数逻辑   //  }  protected override void OnKeyPress(System.Windows.Forms.KeyPressEventArgs e)  {   

2006-03-15 09:31:00 676

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除