摘要:项目中利用反射加载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
阅读全文
03 2013 档案
摘要: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...
阅读全文
摘要:1、设置控件toolStrip1属性RenderMode为System2、重绘代码private void toolStrip1_Paint(object sender, PaintEventArgs e)
{ if ((sender as ToolStrip).RenderMode == ToolStripRenderMode.System) { Rectangle rect = new Rectangle(0, 0, this.toolStrip1.Width, this.toolStrip1.Height - 2); e.Graphics.SetClip(rect); } ...
阅读全文

浙公网安备 33010602011771号