whisht

    十年

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 2 3 4 5 6 ··· 13 下一页

2013年5月23日

摘要: library Properties; { Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. Thi 阅读全文
posted @ 2013-05-23 13:23 WHISHT 阅读(272) 评论(0) 推荐(0) 编辑

摘要: [DllImport("shell32.dll", CharSet = CharSet.Auto)] private static extern IntPtr SHMultiFileProperties(IDataObject pdtobj, int dwFlags); [DllImport("shell32.dll", CharSet = CharSet.Auto)] public static extern IntPtr ILCreateFromPath(string path); [DllImport("shell32.dll" 阅读全文
posted @ 2013-05-23 10:54 WHISHT 阅读(504) 评论(0) 推荐(0) 编辑

2013年5月17日

摘要: Namespace:Microsoft.VisualBasic.FileIOAssembly:Microsoft.VisualBasic(in Microsoft.VisualBasic.dll)SyntaxC#C++F#VBpublicstaticvoidDeleteFile( stringfile, UIOptionshowUI, RecycleOptionrecycle, UICancelOptiononUserCancel ) ParametersfileType:System.StringName and path of the file to be deleted.show... 阅读全文
posted @ 2013-05-17 09:37 WHISHT 阅读(365) 评论(0) 推荐(0) 编辑

2013年5月7日

摘要: using System; using System.Collections.Generic; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Diagnostics; using System.Reflection; namespace BBrowser { static class Program { private const int WS_SHOWNORMAL = 1; public const Int32 AW_BLEND =... 阅读全文
posted @ 2013-05-07 15:12 WHISHT 阅读(298) 评论(0) 推荐(0) 编辑

2013年5月2日

摘要: public static Bitmap RotateImage(Image image, int iw, int ih, float angle, out Point[] points) { if (image == null) throw new ArgumentNullException("image"); const double pi2 = Math.PI / 2.0; // Why can't C# allow these to be cons... 阅读全文
posted @ 2013-05-02 11:39 WHISHT 阅读(209) 评论(0) 推荐(0) 编辑

摘要: /// <summary> /// Creates a new Image containing the same image only rotated /// </summary> /// <param name="image">The <see cref="System.Drawing.Image"/> to rotate</param> /// <param name="angle">The amount to rotate the image, clock 阅读全文
posted @ 2013-05-02 11:37 WHISHT 阅读(333) 评论(0) 推荐(0) 编辑

摘要: /// <summary> /// 处理图片透明操作 /// </summary> /// <param name="srcImage">原始图片</param> /// <param name="opacity">透明度(0.0---1.0)</param> /// <returns></returns> private Image TransparentImage(Image srcImage, float opacity) { float[][] nAr 阅读全文
posted @ 2013-05-02 11:33 WHISHT 阅读(4325) 评论(0) 推荐(1) 编辑

2013年4月11日

摘要: C#做浏览器,需要获取当前网页选中的内容具体方法 引用--》COM--》Microsoft HTML Object Library代码:using mshtml; IHTMLDocument2 document = (IHTMLDocument2)web.Document.DomDocument; IHTMLTxtRange htmlElem = (IHTMLTxtRange)document.selection.createRange(); string text = htmlElem.text; //选中的文字内容 阅读全文
posted @ 2013-04-11 17:48 WHISHT 阅读(1568) 评论(0) 推荐(0) 编辑

2013年3月22日

摘要: 项目中利用反射加载dll,部署要求所有dll放在指定的文件夹,与主程序不在一起,测试使用Assembly.LoadFile,一切正常,直到有的dll还引用其它dll时碰到问题,查msdn解释改为LoadForm正常另:Assembly.LoadFile 与 Assembly.LoadFrom的区别1、Assembly.LoadFile只载入相应的dll文件,比如Assembly.LoadFile("a.dll"),则载入a.dll,如果a.dll中引用了b.dll的话,b.dll并不会被载入。Assembly.LoadFrom则不一样,它会载入dll文件及其引用的其他dll 阅读全文
posted @ 2013-03-22 11:36 WHISHT 阅读(1431) 评论(1) 推荐(0) 编辑

2013年3月1日

摘要: private void FrmMain_Paint(object sender, PaintEventArgs e) { GraphicsPath oPath = new GraphicsPath(); int x = 0; int y = 0; int w = Width; int h = Height; int a = 8; Graphics g = CreateGraphics(); oPath.AddArc(x, y, a, a, 180, 90); //边框格式 oPath.AddArc... 阅读全文
posted @ 2013-03-01 10:36 WHISHT 阅读(1280) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 13 下一页