https://msdn.microsoft.com/en-us/library/t5b5kc41(v=vs.110).aspx Spacing and Aligning Controls Using Snaplines Snaplines give you an accurate and intuitive way to align controls on your form. They appear when you are moving a selected control or cont…
https://msdn.microsoft.com/en-us/library/ms229627.aspx Margin and Padding Precise placement of controls on your form is a high priority for many applications. The System.Windows.Forms namespace gives you many layout features to accomplish this. Two o…
WPF中实例化Com组件,调用组件的方法时报System.Windows.Forms.AxHost+InvalidActiveXStateException的异常 在wpf中封装Com组件时,调用组件的方法时抛出异常System.Windows.Forms.AxHost+InvalidActiveXStateException的异常. 通过网上查询发现,除了实例化com组件,还要将该对象进行初始化. 添加如下代码后 System.Windows.Controls.Grid CTSGrid = n…
Double Buffering Windows Forms As much as we would like it not to be the case, graphics can be slow enough to watch as the screen is refreshed. Our eyes, sensitive to movement and particularly to edge detection so that we don't walk off of cliffs or…
这个案例指在介绍微软这套免费又功能强大的图表控件Microsoft Chart Controls for Microsoft .NET Framework 3.5,通过它,可让您的项目及报表,轻松套用各种功能强大的 2D.3D.实时变化的动态图表:且透过 AJAX,可让图表及里面的数据,每秒钟都持续更新:使用者透过浏览器,可和图表做各种互动设定 下面结合BBVS项目中温度功能模块中温度曲线的绘制 做了如下Demo,供大家学习微软的这款功能强大的图标控件,这里只是起一个抛砖引玉的作用,更多更好玩的…
导读 1.用VS创建一个Windows Forms程序 2.分析上面的程序 3.Mediator pattern(中介者模式) 4.卡UI怎么办——BackgroundWorker组件 用VS创建一个Windows Forms程序 博主应为项目需要用的VS2005,所以这个系列的Windows Forms 特指Windows Forms 2.0. 打开VS2005 –> 建立 Windows应用程序,过程截图如下(其实这种简单的步骤,做C#开发都会) 拖拽一个Button 和 TextBox 控…
using System; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Drawing; using System.ComponentModel;namespace Vista.Controls { public class CommandLink : Button { [DllImport("user32.dll", CharSet…
#region 程序集 System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Windows.Forms.dll #endregion using System.…
#region 程序集 System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll #endregion using System.Collections; using System.ComponentModel; using Syst…
第三章 菜单 1,控件和容器 所有的Windows Forms控件都是从System.Windows.Forms.Control类继承的,相关类的层次结构如下图所示: MarshalByRefObject类表示必须通过引用进行列集(marshale)的对象.列集表示从一个上下文环境中传递一个数据项使它可以在另一个上下文环境中被理解的一种机制.只在创建它们的进程中有效,必须通过引用才能在进程外使用. Component类为通过引用进行列集的对象提供了IComponent接口.组件是可以在容器中存在…