摘要:
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 阅读全文
摘要:
[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" 阅读全文
摘要:
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... 阅读全文
摘要:
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 =... 阅读全文
摘要:
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... 阅读全文
摘要:
/// <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 阅读全文
摘要:
/// <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 阅读全文
摘要:
C#做浏览器,需要获取当前网页选中的内容具体方法 引用--》COM--》Microsoft HTML Object Library代码:using mshtml; IHTMLDocument2 document = (IHTMLDocument2)web.Document.DomDocument; IHTMLTxtRange htmlElem = (IHTMLTxtRange)document.selection.createRange(); string text = htmlElem.text; //选中的文字内容 阅读全文
摘要:
项目中利用反射加载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 阅读全文
摘要:
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... 阅读全文