Assembly assembly = Assembly.GetExecutingAssembly(); object[] assemblyTitleAttributes = assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false); if (assemblyTitleAttributes.Length >0) title = (assemblyTitleAttributes[0] as AssemblyTitleAttribute).Title; version = assembly.GetName().Version.ToString();
4.有时需要统一设置窗体上控件的属性,作界面上的运行期绑定,下面提供一个返回所有控件的函数
5.消息机制,写Windows程序,很有可能需要自定义消息加以处理
protectedoverridevoid DefWndProc(ref System.Windows.Forms.Message m)