随笔分类 -  winform

打印小结
摘要:以PrintDocument为中心1。PrintDialog设置PrintDocument的PrinterSetting属性,2。PageSetupDialog设置PrintDocument的DefaulePageSettings属性3。如果你不想用PrintDialog,就自定义打印机设置PrinterSetting类, 取得... 阅读全文

posted @ 2005-11-04 10:42 井泉 阅读(1092) 评论(2) 推荐(0)

Windows 控件限制用户输入的基本法门(.NET 篇) 选择自 FlashElf 的 Blo
摘要:Windows 控件限制用户的基本法门(.NET 篇) ------------------------------------------------------------------- 本代码演示 控制用户的输入的基本方式(屏蔽非数字字符输入) .net 下限制用户输入,看见很多人是在 键盘,或... 阅读全文

posted @ 2005-11-03 16:17 井泉 阅读(338) 评论(0) 推荐(0)

Win32类型和.net类型的对应表 选择自 AppleDotnet 的 Blog
摘要:习惯用C#写东西,但平时又会碰到很多要用win32 API的地方,所以经常要用DllImport,但win32函数的类型写法是很庞杂的,相信为之困扰的不止我一个,现在我整理一份我个人的理解如下,希望高人不吝赐教。我的基本原则有如下几点:1、下面都是针对32位系统的,所以int是32位.long也是32位;2、各种句柄类的(H开头),我认为一律是System.IntPtr,到目前为止没发现出错... 阅读全文

posted @ 2005-11-03 14:31 井泉 阅读(264) 评论(0) 推荐(0)

实现动态套打
摘要:using System;using System.Data;using System.Drawing;using System.Drawing.Printing;using System.IO;using System.Windows.Forms; public class Form1 : System.Windows.Forms.Form { private string path... 阅读全文

posted @ 2005-11-03 13:06 井泉 阅读(628) 评论(0) 推荐(0)

控件的拖动和缩放
摘要:using System;using System.Drawing;using System.Windows.Forms; public class Form1 : System.Windows.Forms.Form { Form1() { InitializeComponent(); } [STAThread] static void Main() { A... 阅读全文

posted @ 2005-11-03 09:43 井泉 阅读(355) 评论(0) 推荐(0)

游戏开发
摘要:游戏开发向来都是c,c++的天下,大型游戏甚至连c++都靠边站。心想什么时候C#能成主流。 终于等到了托管的directx9 支持c# 和 vb.net 后来又发现 Avalon (Windows Presentation Foundation)不准确的说是 directx10 ,以下是引用的话。 (Windows Presentation Foundat... 阅读全文

posted @ 2005-10-31 11:17 井泉 阅读(1963) 评论(12) 推荐(0)

使用事件属性, 优化事件实现
摘要:Events 属性的类型为 EventHandlerList;private static readonly object ClickEvent = new object(); public event EventHandler Click { add { Event... 阅读全文

posted @ 2005-10-28 17:26 井泉 阅读(296) 评论(0) 推荐(0)

遍历treeView子节点 同时遍历父结点 直到顶级结点 并不是全部父的集合
摘要:private void treeView1_AfterCheck(object sender, TreeViewEventArgs e) { oMM.ToggleAllChildNodes(e.Node,e.Node.Checked); treeView1.AfterCheck-=new TreeViewEventHandler(treeView1_AfterCheck); ... 阅读全文

posted @ 2005-10-28 16:30 井泉 阅读(1760) 评论(0) 推荐(0)

导航