博主资料

留言 加为好友 收藏

用户名:  239212
来自:  山东 济南

日历

2008 8.20 Wed
     12
3456789
10111213141516
17181920212223
24252627282930
31      
«» 2008 - 8 «»

日志分类

文章搜索

文章列表

最新评论

日志文章列表

2007年08月20日 15:46:28

捕捉键盘组合键

/// <summary>
       /// 捕捉键盘组合键
       /// </summary>
       /// <param name="sender"></param>
       /// <param name="e"></param>
       private void tbM..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(285) |  收藏
2007年08月20日 15:44:50

给按钮加提示

ToolTip tips = new ToolTip();
tips.SetToolTip(btLoad, "Reload data from groceries.txt file");

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(293) |  收藏
2007年08月20日 15:44:29

2自定义按钮

public class MyButton : System.Windows.Forms.Button

   {

       public MyButton()

       {

           this.Paint += new System.Windows.Forms.PaintEventHandler(this.button1_Paint);

       }

       pr..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(286) |  收藏
2007年08月20日 15:43:29

按钮

1自动尺寸的按钮
   private void button1_Click(object sender, System.EventArgs e)
       {
           button1.Text=this.textBox1.Text;
           Graphics g=button1.CreateGraphics();
           float w=g.MeasureString(button1..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(301) |  收藏
2007年08月20日 15:41:57

让任务栏闪烁

using System.Runtime.InteropServices;
--------------------------        
[DllImport("user32.dll")]
       public static extern bool FlashWindow(
           IntPtr hWnd, // handle to window
           bool b..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(284) |  收藏
2007年08月20日 15:41:17

当前窗口设置

using System.Runtime.InteropServices;
-----------------------------------------------
       [DllImport("user32.dll")]
       public static extern bool SetWindowPos(IntPtr hWnd,IntPtr hPos,int x,..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(258) |  收藏
2007年08月20日 15:40:41

让PC喇叭响起来

using System.Runtime.InteropServices;
[DllImport("user32.dll")]        
public static extern bool MessageBeep(uint uType);
MessageBeep(1);//PC喇叭响

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(280) |  收藏
2007年08月20日 15:39:30

代码隐藏

1.Calc.asmx
<%@ WebService Language="C#" Class="CalcService" %>
2.Calc.cs 编译dll并放到bin目录下
using System;
using System.Web.Services;
[WebService(Name="Calcul..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(275) |  收藏
2007年08月20日 15:36:33

c#绘图

GDI+资源释放.txt
1.手工调用Dispose()
2.使用using
3.寄希望于资源回收器。
4.重用
gif动画.txt
设置pictureBox1的image属性即可
Image类.txt
Image 是抽象类:
Bitmap,Cusor,Icon,Metafile 它的派生类
..

阅读全文>>

类别: 无分类 |  评论(0) |  浏览(283) |  收藏