04 2014 档案
摘要://获取系统字体:InstalledFontCollection fc = new InstalledFontCollection(); foreach( FontFamily font in fc.Families ){ ListItem tmp = new ListItem( font...
阅读全文
摘要:private bool IsAllowedExtension(HttpPostedFile hifile) { bool ret = false; System.IO.FileStream fs = new System.IO.F...
阅读全文
摘要:System.Diagnostics.Process.Start(); 能做什么呢?它主要有以下几个功能:1、打开某个链接网址(弹窗)。2、定位打开某个文件目录。3、打开系统特殊文件夹,如“控制面板”等。那么它是怎么实现这几个功能的呢?在讲应用前,我们先来看看Process.Star()的构造方法...
阅读全文
摘要:Image img = Image.FromHbitmap(icon.ToBitmap().GetHbitmap()); Graphics g = Graphics.FromImage(img); g.DrawImage(img, 0, 0, img.Width, img.Height); Font f = new Font("Verdana", 32); Brush b = ne...
阅读全文
摘要:/// /// Converts an image into an icon. /// /// The image that shall become an icon /// The width and height of the icon. Standard /// sizes are 16x16, 32x32, 48x48, 64x64. /// Whether the image should be squashed into a /// square or whether whites...
阅读全文