当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 类Hotkey.cs using System;
 

 

 ·---------续    »显示摘要«
    摘要: 现在我们可以改变xml块并且通过这个改变过的xml创建一个新的对象了。比如我们通过改变xml中name元素的值来给新的对象一个不同的name属性值。 为了显示新的对象的细节,我们要使用一个asp.net服务器端控件。这个控件将有一个叫做book的属性,用它来告诉控件把哪个book来做输出处理(render)。在代码中创建一个新的类叫bookview。 imports system ......
    摘要: 如果在文本框中输入简单的数学计算式:200+100*290之类的计算式,如何计算出他们的值: using system; using system.codedom; using system.codedom.compiler; using microsoft.csharp; using system.text; using system.reflection; namespac......


ToCNET:全局热键的例子,不知道有没有用
类hotkey.cs using system; namespace durius.generics { public delegate void hotkeyeventhandler(int hotkeyid); /// <summary> /// system wide hotkey wrapper. ///   /// robert jeppesen /// send bugs to robert@durius.com /// </summary> public class hotkey : system.windows.forms.imessagefilter {   system.collections.hashtable keyids = new system.collections.hashtable();   intptr hwnd;   /// <summary>   /// occurs when a hotkey has been pressed.   /// </summary>   public event hotkeyeventhandler onhotkey;   public enum keyflags   {    mod_alt = 0x1,    mod_control = 0x2,    mod_shift = 0x4,    mod_win = 0x8   }   [system.runtime.interopservices.dllimport("user32.dll")]   public static extern uint32 registerhotkey( intptr hwnd, uint32 id,    uint32 fsmodifiers, uint32 vk);   [system.runtime.interopservices.dllimport("user32.dll")]   public static extern uint32 unregisterhotkey( intptr hwnd, uint32 id);   [system.runtime.interopservices.dllimport("kernel32.dll")]   public static extern uint32 globaladdatom( string lpstring );   [system.runtime.interopservices.dllimport("kernel32.dll")]   public static extern uint32 globaldeleteatom( uint32 natom );   /// <summary&
...   下一页
 ·窗体的close方法与hide方法...    »显示摘要«
    摘要: form1.close和form1.hide都能让用户看不见form1,但二者还是有些不同的,设计时可以注意以下方面: 1.close方法是关闭窗体,该窗体关闭后将不占系统资源.而hide方法是隐藏窗体,是将其窗体的visible属性设置为flase,系统并不释放其资源. 2.窗体隐藏后,用户不能与其交互,但从代码中依然能访问其中的控件.因此,需要经常显示的窗体应采用hide方法,......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE