摘要: Font中的Properties都是readonly,并且Font不能被继承,所以序列化和反序列化Font会相对麻烦一点。需要写一个FontSerializer类来实现Font序列化和反序列化。先写测试代码: [TestMethod()] public void FontSerializationTest() { const string _anyFileName = @"D:/FontSerializerTest.xml"; XmlTextWriter writer = new XmlTextWriter(_anyFileName, null); writer.Forma 阅读全文
posted @ 2011-04-08 22:38 wanghui 阅读(1274) 评论(0) 推荐(1) 编辑
摘要: 在VS2008中编写如下代码:PrintDialog printDialog = new PrintDialog();printDialog.ShowDialog();在XP环境下,它可以正常显示出打印对话框。但在Windows 7 64位环境下,什么也显示不出来,也没有异常抛出。将PrintDialog.UseEXDialog属性设置为True,可显示出打印对话框。代码如下:PrintDialog printDialog = new PrintDialog();printDialog.UseEXDialog = true;printDialog.ShowDialog();参见此链接。 阅读全文
posted @ 2011-04-08 22:12 wanghui 阅读(2450) 评论(0) 推荐(2) 编辑