{"id":125,"date":"2010-06-18T09:29:13","date_gmt":"2010-06-18T09:29:13","guid":{"rendered":"3def184ad8f4755ff269862ea77393dd"},"modified":"2010-06-18T09:29:13","modified_gmt":"2010-06-18T09:29:13","slug":"","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/125","title":{"rendered":"c# GDI+\u7b80\u5355\u7ed8\u56fe"},"content":{"rendered":"<p><font face=\"\u5b8b\u4f53\" size=\"2\">\u6700\u8fd1\u5bf9<\/font><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">GDI+<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8fd9\u4e2a\u4e1c\u897f\u63a5\u89e6\u7684\u6bd4\u8f83\u591a\uff0c\u4e5f\u505a\u4e86\u4e9b\u7b80\u5355\u7684\u5b9e\u4f8b\uff0c\u6bd4\u5982\u7ed8\u56fe\u677f\uff0c\u4eff<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">QQ<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u622a\u56fe\u7b49\uff0e<\/span>\n<\/p>\n<p align=\"left\" style=\"text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u3000\u3000\u6700\u65e9\u63a5\u89e6\u8fd9\u4e2a\u7c7b\uff0c\u662f\u56e0\u4e3a\u60f3\u505a\u4eff<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">QQ<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u622a\u56fe\u7684\u6548\u679c\uff0e\u5de7\u7684\u5f88\uff0c\u5b66\u4f1a\u4e86\u5982\u4f55\u505a\u622a\u56fe\u540e\uff0c<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.NET<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8bfe\u5802\u4e0a\u8001\u5e08\u4e5f\u6b63\u5de7\u8981\u8bb2\u5173\u4e8e<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">c#<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u7ed8\u56fe\u65b9\u9762\u7684\u77e5\u8bc6\uff0c\u5e76\u4e14\u6211\u81ea\u5df1\u53c8\u5728\u7f51\u4e0a\u5b66\u4e60\u91d1\u8001\u5e08\u7684\u57f9\u8bad\u73ed\uff0c\u4e5f\u662f\u8981\u7528\u5230\u8fd9\u4e2a\u7c7b\uff0e\u5728\u5b66\u4e60\u4e2d\u6709\u4e00\u4e9b\u4f53\u4f1a\uff0c\u6240\u4ee5\u51c6\u5907\u628a\u8fd9\u4e9b\u4f53\u4f1a\u8bb0\u4e0b\u6765\uff0c\u56e0\u4e3a\u5185\u5bb9\u6bd4\u8f83\u591a\uff0c\u53ef\u80fd\u6211\u4f1a\u5206\u51e0\u6b21\u5199\uff0e<\/span>\n<\/p>\n<p align=\"left\" style=\"margin-left: 18pt; text-indent: -18pt; text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u3000\u3000\u5e9f\u8bdd\u4e0d\u591a\u8bf4\u4e86\uff0c\u6211\u4eec\u5148\u6765\u8ba4\u8bc6\u4e00\u4e0b\u8fd9\u4e2a<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">GDI+<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\uff0c\u770b\u770b\u5b83\u5230\u5e95\u957f\u4ec0\u4e48\u6837<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<\/span>\n<\/p>\n<p align=\"left\" style=\"text-indent: 18pt; text-align: left\"><span style=\"font-size: 9pt; color: blue; font-family: arial\">GDI+<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff1a<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Graphics Device Interface Plus<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u4e5f\u5c31\u662f\u56fe\u5f62\u8bbe\u5907\u63a5\u53e3<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u63d0\u4f9b\u4e86\u5404\u79cd\u4e30\u5bcc\u7684\u56fe\u5f62\u56fe\u50cf\u5904\u7406\u529f\u80fd<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">;<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u5728<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">C#.NET<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u4e2d\uff0c\u4f7f\u7528<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">GDI+<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u5904\u7406\u4e8c\u7ef4\uff08<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">2D<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff09\u7684\u56fe\u5f62\u548c\u56fe\u50cf\uff0c\u4f7f\u7528<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">DirectX<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u5904\u7406\u4e09\u7ef4\uff08<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">3D<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff09\u7684\u56fe\u5f62\u56fe\u50cf<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u56fe\u5f62\u56fe\u50cf\u5904\u7406\u7528\u5230\u7684\u4e3b\u8981\u547d\u540d\u7a7a\u95f4\u662f<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">System . Drawing<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff1a\u63d0\u4f9b\u4e86\u5bf9<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">GDI+<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u57fa\u672c\u56fe\u5f62\u529f\u80fd\u7684\u8bbf\u95ee\uff0c\u4e3b\u8981\u6709<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Graphics<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Bitmap<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001\u4ece<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Brush<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u7ee7\u627f\u7684\u7c7b\u3001<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Font<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Icon<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Image<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Pen<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">Color<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u7b49<\/span><br \/>\n <span style=\"font-size: 9pt; color: blue; font-family: arial\">.<\/span>\n<\/p>\n<p align=\"left\" style=\"margin-left: 0.05pt; text-indent: 18pt; text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5927\u6982\u4e86\u89e3\u4e86\u4ec0\u4e48\u662f<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">GDI+<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u540e<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6211\u4eec\u6765\u770b\u4e00\u4e0b\u7ed8\u56fe\u8981\u7528\u5230\u7684\u4e3b\u8981\u5de5\u5177<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8981\u753b\u56fe<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u80af\u5b9a\u8981<span style=\"color: blue\">\u753b\u677f<\/span><br \/>\n \u5427<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5728<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">C#<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4e2d\u753b\u677f\u53ef\u4ee5\u901a\u8fc7<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">Graphics<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8fd9\u4e2a\u7c7b\u6765\u521b\u5efa<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6709\u4e86\u753b\u677f<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u603b\u5f97\u5f04\u4e2a<span style=\"color: blue\">\u7b14<\/span><br \/>\n \u4ec0\u4e48\u4e4b\u7c7b\u7684\u5427<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4e0d\u7136\u600e\u4e48\u753b\u5440<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u96be\u4e0d\u6210\u6211\u4eec\u7528\u624b\u6307\u753b<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u7b14\u53c8\u53ef\u4ee5\u5206\u597d\u591a\u79cd\u7c7b<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6bd4\u5982\u94c5\u7b14<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u753b\u5237\u7b49<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5b83\u4eec\u7684\u533a\u522b\u4e3b\u8981\u662f\u94c5\u7b14\u53ef\u4ee5\u7528\u6765\u753b\u7ebf\u6761<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u800c\u753b\u5237\u5462<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u563f\u563f<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u81ea\u5df1\u8003\u8651\u4e0b<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5728<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">c#<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4e2d\u6211\u4eec\u53ef\u4ee5\u7528<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">Pen,Brush<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u7c7b\u6765\u5b9e\u73b0\u7c7b\u4f3c\u529f\u80fd<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u989c\u6599\u5219\u81ea\u7136\u662f\u7528<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">Color<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u7c7b\u4e86<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<\/span>\n<\/p>\n<p align=\"left\" style=\"margin-left: 18pt; text-indent: -18pt; text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6709\u4e86\u5de5\u5177<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u52a8\u624b\u4e86<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">!(\u6240\u9700\u547d\u540d\u7a7a\u95f4\uff1a<font size=\"3\">using System.Drawing;<\/font><br \/>\n )<\/span>\n<\/p>\n<p align=\"left\" style=\"margin-left: 18pt; text-indent: -18pt; text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5b9e\u73b0\u6548\u679c<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">:<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5728\u7a7a\u767d\u7a97\u4f53\u4e2d\u753b\u57fa\u672c\u56fe\u5f62<\/span>\n<\/p>\n<p align=\"left\" style=\"text-align: left\"><strong><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u9996\u5148<\/span><br \/>\n <\/strong><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u51c6\u5907\u4e00\u4e2a\u753b\u677f<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">:<br \/><\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u521b\u5efa\u4e00\u4e2a\u753b\u677f\u4e3b\u8981\u6709<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">3<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u79cd\u65b9\u5f0f<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">:<br \/>A: <\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5728\u7a97\u4f53\u6216\u63a7\u4ef6\u7684<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">Paint<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4e8b\u4ef6\u4e2d\u76f4\u63a5\u5f15\u7528<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">Graphics<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5bf9\u8c61<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\"><br \/>B: <\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5229\u7528\u7a97\u4f53\u6216\u67d0\u4e2a\u63a7\u4ef6\u7684<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">CreateGraphics<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u65b9\u6cd5<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\"><br \/>C: <\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4ece\u7ee7\u627f\u81ea\u56fe\u50cf\u7684\u4efb\u4f55\u5bf9\u8c61\u521b\u5efa<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">Graphics<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5bf9\u8c61<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\"><br \/><\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8fd9\u6b21\u6211\u4eec\u5c31\u5148\u4ee5<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">A<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4e3a\u4f8b\u8bf4\u660e\u95ee\u9898<\/span><br \/>\n <strong><span style=\"font-size: 9pt; font-family: arial\">:<br \/><\/span><br \/>\n<\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><span style=\"font-size: 9pt; font-family: arial\"><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Form1_Paint(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;PaintEventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n &nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_67_138_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;e.Graphics;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u521b\u5efa\u753b\u677f,\u8fd9\u91cc\u7684\u753b\u677f\u662f\u7531Form\u63d0\u4f9b\u7684.<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <\/strong>\n<\/div>\n<p align=\"left\" style=\"text-align: left\"><strong><span style=\"font-size: 9pt; font-family: arial\"><br \/><\/span><br \/>\n<\/strong>\n<\/p>\n<p align=\"left\" style=\"text-align: left\"><strong><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u7136\u540e<\/span><br \/>\n <\/strong><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6211\u4eec\u8981\u53ea\u7b14<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">:<\/span>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><span style=\"font-size: 9pt; font-family: arial\"><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Form1_Paint(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;PaintEventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n &nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_66_197_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;e.Graphics;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u521b\u5efa\u753b\u677f,\u8fd9\u91cc\u7684\u753b\u677f\u662f\u7531Form\u63d0\u4f9b\u7684.<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pen&nbsp;p&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Pen(Color.Blue,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">2<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u4e86\u4e00\u4e2a\u84dd\u8272,\u5bbd\u5ea6\u4e3a\u7684\u753b\u7b14<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span>\n<\/div>\n<p align=\"left\" style=\"text-align: left\"><strong><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u63a5\u4e0b\u6765<\/span><br \/>\n <\/strong><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6211\u4eec\u5c31\u53ef\u4ee5\u6765\u753b\u753b\u4e86<\/span><br \/>\n <span style=\"font-size: 9pt; font-family: arial\">.<br \/><\/span>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><span style=\"font-size: 9pt; font-family: arial\"><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Form1_Paint(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;PaintEventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n &nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_66_438_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;e.Graphics;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u521b\u5efa\u753b\u677f,\u8fd9\u91cc\u7684\u753b\u677f\u662f\u7531Form\u63d0\u4f9b\u7684.<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pen&nbsp;p&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Pen(Color.Blue,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">2<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u4e86\u4e00\u4e2a\u84dd\u8272,\u5bbd\u5ea6\u4e3a\u7684\u753b\u7b14<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5728\u753b\u677f\u4e0a\u753b\u76f4\u7ebf,\u8d77\u59cb\u5750\u6807\u4e3a(10,10),\u7ec8\u70b9\u5750\u6807\u4e3a(100,100)<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawRectangle(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5728\u753b\u677f\u4e0a\u753b\u77e9\u5f62,\u8d77\u59cb\u5750\u6807\u4e3a(10,10),\u5bbd\u4e3a,\u9ad8\u4e3a<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawEllipse(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5728\u753b\u677f\u4e0a\u753b\u692d\u5706,\u8d77\u59cb\u5750\u6807\u4e3a(10,10),\u5916\u63a5\u77e9\u5f62\u7684\u5bbd\u4e3a,\u9ad8\u4e3a<\/span><br \/>\n &nbsp;<span style=\"color: #008000\"><br \/><\/span><br \/>\n&nbsp;<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span>\n<\/div>\n<p><span style=\"font-size: 9pt; font-family: \u65b0\u5b8b\u4f53\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <strong><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6548\u679c\u56fe\u5982\u4e0b<\/span><br \/>\n <\/strong><br \/>\n<strong><span style=\"font-size: 9pt; font-family: arial\">:<br \/><\/span><br \/>\n&nbsp;<a href=\"\/notes\/content\/uploadfile\/201006\/f3ccdd27d2000e3f9255a7e3e2c4880020100618013125.jpg\" id=\"ematt:34\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/f3ccdd27d2000e3f9255a7e3e2c4880020100618013125.jpg\" \/><\/a><br \/>\n <\/strong>\n<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-indent: 21.1pt\"><strong><strong>1.<\/strong><br \/>\n <strong><span style=\"font-family: \u5b8b\u4f53\">\u9996\u5148\u6211\u4eec\u6765\u770b\u4e0b\u4e0a\u4e00\u7247\u4e2d\u6211\u4eec\u4f7f\u7528\u8fc7\u7684<\/span><br \/>\n Pen.<\/strong><br \/>\n <\/strong>\n<\/p>\n<p style=\"text-indent: 21pt\"><strong>Pen<span style=\"font-family: \u5b8b\u4f53\">\u7684\u5c5e\u6027\u4e3b\u8981\u6709<\/span><br \/>\n : Color(<span style=\"font-family: \u5b8b\u4f53\">\u989c\u8272<\/span><br \/>\n ),DashCap(<span style=\"font-family: \u5b8b\u4f53\">\u77ed\u5212\u7ebf\u7ec8\u70b9\u5f62\u72b6<\/span><br \/>\n ),DashStyle(<span style=\"font-family: \u5b8b\u4f53\">\u865a\u7ebf\u6837\u5f0f<\/span><br \/>\n ),EndCap(<span style=\"font-family: \u5b8b\u4f53\">\u7ebf\u5c3e\u5f62\u72b6<\/span><br \/>\n ), StartCap(<span style=\"font-family: \u5b8b\u4f53\">\u7ebf\u5934\u5f62\u72b6<\/span><br \/>\n ),Width(<span style=\"font-family: \u5b8b\u4f53\">\u7c97\u7ec6<\/span><br \/>\n )<span style=\"font-family: \u5b8b\u4f53\">\u7b49<\/span><br \/>\n .<\/strong>\n<\/p>\n<p style=\"text-indent: 21pt\"><strong><span style=\"font-family: \u5b8b\u4f53\">\u6211\u4eec\u53ef\u4ee5\u7528<\/span><br \/>\n Pen <span style=\"font-family: \u5b8b\u4f53\">\u6765\u753b\u865a\u7ebf<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u5e26\u7bad\u5934\u7684\u76f4\u7ebf\u7b49<\/span><br \/>\n <\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #000000\">Pen&nbsp;&nbsp;p&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;&nbsp;Pen(Color.Blue,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">5<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8bbe\u7f6e\u7b14\u7684\u7c97\u7ec6\u4e3a,\u989c\u8272\u4e3a\u84dd\u8272<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">Graphics&nbsp;&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.CreateGraphics();<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u753b\u865a\u7ebf<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">p.DashStyle&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;DashStyle.Dot;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u865a\u7ebf\u7684\u6837\u5f0f\u4e3a\u70b9<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">200<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u81ea\u5b9a\u4e49\u865a\u7ebf<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">p.DashPattern&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">float<\/span><br \/>\n <span style=\"color: #000000\">[]&nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_203_211_Open_Text\"><span style=\"color: #000000\">{&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">2<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">1<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8bbe\u7f6e\u77ed\u5212\u7ebf\u548c\u7a7a\u767d\u90e8\u5206\u7684\u6570\u7ec4<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">20<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">200<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">20<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u753b\u7bad\u5934,\u53ea\u5bf9\u4e0d\u5c01\u95ed\u66f2\u7ebf\u6709\u7528<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">p.DashStyle&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;DashStyle.Solid;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u6062\u590d\u5b9e\u7ebf<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">p.EndCap&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;LineCap.ArrowAnchor;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u7ebf\u5c3e\u7684\u6837\u5f0f\u4e3a\u7bad\u5934<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">30<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">200<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">30<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>g.Dispose();<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>p.Dispose();<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <\/strong>\n<\/div>\n<p><strong><br \/>&nbsp;<\/strong>\n<\/p>\n<p><strong><span style=\"font-family: \u5b8b\u4f53\">\u4ee5\u4e0a\u4ee3\u7801\u8fd0\u884c\u7ed3\u679c:<br \/><a href=\"\/notes\/content\/uploadfile\/201006\/9b81ee590d27c91277ce8f36280285e320100618013234.jpg\" id=\"ematt:36\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/9b81ee590d27c91277ce8f36280285e320100618013234.jpg\" \/><\/a><\/p>\n<p>&nbsp; <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"text-indent: 21pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><strong>2.<\/strong><br \/>\n <strong><span style=\"font-family: \u5b8b\u4f53\">\u63a5\u4e0b\u6765\u6211\u4eec\u6765\u770b\u4e0b<\/span><br \/>\n Brush<\/strong><br \/>\n <strong><span style=\"font-family: \u5b8b\u4f53\">\u7684\u4f7f\u7528<\/span><br \/>\n <\/strong><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"text-indent: 21pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">\u4f5c\u7528<\/span><br \/>\n :<span style=\"font-family: \u5b8b\u4f53\">\u6211\u4eec\u53ef\u4ee5\u7528\u753b\u5237\u586b\u5145\u5404\u79cd\u56fe\u5f62\u5f62\u72b6\uff0c\u5982\u77e9\u5f62\u3001\u692d\u5706\u3001\u6247\u5f62\u3001\u591a\u8fb9\u5f62\u548c\u5c01\u95ed\u8def\u5f84\u7b49<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u4e3b\u8981\u6709\u51e0\u79cd\u4e0d\u540c\u7c7b\u578b\u7684\u753b\u5237<\/span><br \/>\n :<\/span><br \/>\n <\/strong>\n<\/p>\n<p style=\"margin-left: 36pt; text-indent: -18pt; tab-stops: list 36.0pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">&bull;<span style=\"font: 7pt 'times new roman'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><br \/>\n<\/span><br \/>\nSolidBrush<span style=\"font-family: \u5b8b\u4f53\">\uff1a\u753b\u5237\u6700\u7b80\u5355\u7684\u5f62\u5f0f\uff0c\u7528\u7eaf\u8272\u8fdb\u884c\u7ed8\u5236<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"margin-left: 36pt; text-indent: -18pt; tab-stops: list 36.0pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">&bull;<span style=\"font: 7pt 'times new roman'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><br \/>\n<\/span><br \/>\nHatchBrush<span style=\"font-family: \u5b8b\u4f53\">\uff1a\u7c7b\u4f3c\u4e8e<\/span><br \/>\n SolidBrush<span style=\"font-family: \u5b8b\u4f53\">\uff0c\u4f46\u662f\u53ef\u4ee5\u5229\u7528\u8be5\u7c7b\u4ece\u5927\u91cf\u9884\u8bbe\u7684\u56fe\u6848\u4e2d\u9009\u62e9\u7ed8\u5236\u65f6\u8981\u4f7f\u7528\u7684\u56fe\u6848\uff0c\u800c\u4e0d\u662f\u7eaf\u8272<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"margin-left: 36pt; text-indent: -18pt; tab-stops: list 36.0pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">&bull;<span style=\"font: 7pt 'times new roman'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><br \/>\n<\/span><br \/>\nTextureBrush<span style=\"font-family: \u5b8b\u4f53\">\uff1a\u4f7f\u7528\u7eb9\u7406\uff08\u5982\u56fe\u50cf\uff09\u8fdb\u884c\u7ed8\u5236<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"margin-left: 36pt; text-indent: -18pt; tab-stops: list 36.0pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">&bull;<span style=\"font: 7pt 'times new roman'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><br \/>\n<\/span><br \/>\nLinearGradientBrush<span style=\"font-family: \u5b8b\u4f53\">\uff1a\u4f7f\u7528\u6cbf\u6e10\u53d8\u6df7\u5408\u7684\u4e24\u79cd\u989c\u8272\u8fdb\u884c\u7ed8\u5236<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"margin-left: 36pt; text-indent: -18pt; tab-stops: list 36.0pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">&bull;<span style=\"font: 7pt 'times new roman'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><br \/>\n<\/span><br \/>\nPathGradientBrush <span style=\"font-family: \u5b8b\u4f53\">\uff1a\u57fa\u4e8e\u7f16\u7a0b\u8005\u5b9a\u4e49\u7684\u552f\u4e00\u8def\u5f84\uff0c\u4f7f\u7528\u590d\u6742\u7684\u6df7\u5408\u8272\u6e10\u53d8\u8fdb\u884c\u7ed8\u5236<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"text-indent: 21pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">\u6211\u4eec\u8fd9\u91cc\u53ea\u662f\u7b80\u5355\u4ecb\u7ecd\u4f7f\u7528\u5176\u4e2d\u7684\u51e0\u79cd<\/span><br \/>\n :<\/span><br \/>\n <\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><span style=\"font-family: \u5b8b\u4f53\"><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #000000\">Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.CreateGraphics();<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>Rectangle&nbsp;rect&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Rectangle(<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">50<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">50<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u77e9\u5f62,\u53c2\u6570\u4e3a\u8d77\u70b9\u6a2a\u7eb5\u5750\u6807\u4ee5\u53ca\u5176\u957f\u548c\u5bbd<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5355\u8272\u586b\u5145<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">SolidBrush&nbsp;b1&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;SolidBrush(Color.Blue);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u5355\u8272\u753b\u5237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.FillRectangle(b1,&nbsp;rect);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u586b\u5145\u8fd9\u4e2a\u77e9\u5f62<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b57\u7b26\u4e32<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.DrawString(<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #800000\">\u5b57\u7b26\u4e32<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Font(<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #800000\">\u5b8b\u4f53<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">),&nbsp;b1,&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;PointF(<\/span><br \/>\n <span style=\"color: #800080\">90<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">));<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u7528\u56fe\u7247\u586b\u5145<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">TextureBrush&nbsp;b2&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;TextureBrush(Image.FromFile(<\/span><br \/>\n <span style=\"color: #800000\">@&quot;<\/span><br \/>\n <span style=\"color: #800000\">e:\\picture\\1.jpg<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #000000\">));<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>rect.Location&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">70<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u66f4\u6539\u8fd9\u4e2a\u77e9\u5f62\u7684\u8d77\u70b9\u5750\u6807<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">rect.Width&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">200<\/span><br \/>\n <span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u66f4\u6539\u8fd9\u4e2a\u77e9\u5f62\u7684\u5bbd\u6765<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">rect.Height&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">200<\/span><br \/>\n <span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u66f4\u6539\u8fd9\u4e2a\u77e9\u5f62\u7684\u9ad8<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.FillRectangle(b2,&nbsp;rect);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u7528\u6e10\u53d8\u8272\u586b\u5145<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">rect.Location&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(<\/span><br \/>\n <span style=\"color: #800080\">10<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">290<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>LinearGradientBrush&nbsp;b3&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;&nbsp;LinearGradientBrush(rect,&nbsp;Color.Yellow&nbsp;,&nbsp;Color.Black&nbsp;,&nbsp;LinearGradientMode.Horizontal);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>g.FillRectangle(b3,&nbsp;rect);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/div>\n<p><strong><span style=\"font-family: \u5b8b\u4f53\"><br \/>&nbsp;<\/span><br \/>\n <\/strong>\n<\/p>\n<p><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'\">\u8fd0\u884c\u6548\u679c\u56fe<\/span><br \/>\n <span lang=\"EN-US\">:<br \/><\/span><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p align=\"left\" style=\"text-align: left\"><strong><span style=\"font-family: \u5b8b\u4f53\"><strong><a href=\"\/notes\/content\/uploadfile\/201006\/7d108db512f6a6a929cd0d0ad3b593e820100618013234.jpg\" id=\"ematt:38\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/7d108db512f6a6a929cd0d0ad3b593e820100618013234.jpg\" \/><\/a><br \/>\n <\/strong><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p align=\"left\" style=\"text-align: left\"><strong><span style=\"font-family: \u5b8b\u4f53\"><strong>3.<\/strong><br \/>\n <strong><span style=\"font-family: \u5b8b\u4f53\">\u5750\u6807\u8f74\u53d8\u6362<\/span><br \/>\n <\/strong><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p align=\"left\" style=\"text-indent: 21.75pt; text-align: left\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-family: \u5b8b\u4f53\">\u5728<\/span><br \/>\n winform<span style=\"font-family: \u5b8b\u4f53\">\u4e2d\u7684\u5750\u6807\u8f74\u548c\u6211\u4eec\u5e73\u65f6\u63a5\u89e6\u7684\u5e73\u9762\u76f4\u89d2\u5750\u6807\u8f74\u4e0d\u540c<\/span><br \/>\n ,winform<span style=\"font-family: \u5b8b\u4f53\">\u4e2d\u7684\u5750\u6807\u8f74\u65b9\u5411\u5b8c\u5168\u76f8\u53cd<\/span><br \/>\n :<span style=\"font-family: \u5b8b\u4f53\">\u7a97\u4f53\u7684\u5de6\u4e0a\u89d2\u4e3a\u539f\u70b9<\/span><br \/>\n (0,0),<span style=\"font-family: \u5b8b\u4f53\">\u6c34\u5e73\u5411\u5de6\u5219<\/span><br \/>\n X<span style=\"font-family: \u5b8b\u4f53\">\u589e\u5927<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u5782\u76f4\u4e0b\u5411\u5219<\/span><br \/>\n Y<span style=\"font-family: \u5b8b\u4f53\">\u589e\u5927<br \/><\/span><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p align=\"center\"><strong><span style=\"font-family: \u5b8b\u4f53\"><a href=\"\/notes\/content\/uploadfile\/201006\/4f8490bbdddf6ca2cd95779057e7796d20100618013234.jpg\" id=\"ematt:37\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/4f8490bbdddf6ca2cd95779057e7796d20100618013234.jpg\" \/><\/a><br \/>\n <br \/>&nbsp; <\/span><br \/>\n<\/strong>\n<\/p>\n<p align=\"left\" class=\"MsoNormal\" style=\"text-indent: 21.75pt; text-align: left; mso-layout-grid-align: none\">&nbsp;<\/p>\n<p align=\"left\" class=\"MsoNormal\" style=\"text-indent: 21.75pt; text-align: left; mso-layout-grid-align: none\"><strong><span style=\"font-family: \u5b8b\u4f53\">&nbsp; <span style=\"font-family: \u5b8b\u4f53; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'\">\u8fd0\u884c\u6548\u679c\u56fe:<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"text-indent: 21.75pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-size: 9pt; font-family: \u65b0\u5b8b\u4f53\"><span style=\"font-size: 10pt\"><span style=\"font-size: 12pt\"><span style=\"font-size: 10pt\"><strong>4.<\/strong><br \/>\n <strong><span style=\"font-family: \u5b8b\u4f53\">\u6700\u540e\u6211\u4eec\u6765\u770b\u4e0b<\/span><br \/>\n Graphics<\/strong><br \/>\n <strong><span style=\"font-family: \u5b8b\u4f53\">\u8fd9\u4e2a\u753b\u677f\u4e0a\u6211\u4eec\u8fd8\u53ef\u4ee5\u753b\u4ec0\u4e48<\/span><br \/>\n <\/strong><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"text-indent: 21.75pt\"><strong><span style=\"font-family: \u5b8b\u4f53\"><span style=\"font-size: 9pt; font-family: \u65b0\u5b8b\u4f53\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 12pt\"><span style=\"font-family: \u5b8b\u4f53\">\u5176\u5b9e\u6211\u4eec\u4e0a\u9762\u7528\u5230\u7684\u90fd\u662f\u5728\u753b\u4e00\u4e9b\u7b80\u5355\u7684\u56fe\u5f62<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u76f4\u7ebf<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u77e9\u5f62<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u6247\u5f62<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u5706\u5b64\u7b49<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u7528\u5b83\u6765\u7ed8\u5236\u56fe\u7247<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u8fd9\u53ef\u4ee5\u7528\u5b83\u7684<\/span><br \/>\n DrawImage<span style=\"font-family: \u5b8b\u4f53\">\u65b9\u6cd5<\/span><br \/>\n .<\/span><br \/>\n <\/span><br \/>\n<span style=\"font-size: 10pt\"><span style=\"font-size: 12pt\"><span style=\"font-family: \u5b8b\u4f53\">\u8fd9\u91cc\u6211\u4e0d\u8be6\u7ec6\u8bb2\u89e3<\/span><br \/>\n ,<span style=\"font-family: \u5b8b\u4f53\">\u5927\u5bb6\u6709\u5174\u8da3\u53ef\u4ee5\u81ea\u5df1\u53bb<\/span><br \/>\n MSDN<span style=\"font-family: \u5b8b\u4f53\">\u4e86\u89e3\u4e0b<\/span><br \/>\n .<\/span><br \/>\n <\/span><br \/>\n<span style=\"font-size: 10pt\"><span style=\"font-size: 12pt\"><span style=\"font-family: \u5b8b\u4f53\">\u6211\u4eec\u540e\u9762\u4f1a\u8bb2\u5230\u7684\u622a\u56fe\u5c31\u4f1a\u7528\u5230\u8fd9\u4e2a\u65b9\u6cd5<\/span><br \/>\n <\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p style=\"text-indent: 21.75pt\"><strong><span style=\"font-size: 9pt; font-family: \u65b0\u5b8b\u4f53\"><span style=\"font-size: 9pt; font-family: \u65b0\u5b8b\u4f53\"><br \/><a href=\"\/notes\/content\/uploadfile\/201006\/6dfe8354f0f8d8d2fe2fde106125163620100618013234.jpg\" id=\"ematt:35\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/6dfe8354f0f8d8d2fe2fde106125163620100618013234.jpg\" \/><\/a><br \/>\n <br \/>&nbsp; <\/span><br \/>\n<\/span><br \/>\n<\/strong>\n<\/p>\n<p><strong><span style=\"font-family: \u5b8b\u4f53; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'\">\u63a5\u4e0b\u6765<\/span><br \/>\n <span lang=\"EN-US\">,<\/span><br \/>\n <span style=\"font-family: \u5b8b\u4f53; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'\">\u6211\u4eec\u6765\u5b9e\u9645\u64cd\u4f5c\u4e0b<\/span><br \/>\n <span lang=\"EN-US\">,<\/span><br \/>\n <span style=\"font-family: \u5b8b\u4f53; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'\">\u901a\u8fc7\u65cb\u8f6c\u5750\u6807\u8f74\u7684\u65b9\u5411\u6765\u753b\u51fa\u4e0d\u540c\u89d2\u5ea6\u7684\u56fe\u6848<\/span><br \/>\n <span lang=\"EN-US\">,<\/span><br \/>\n <span style=\"font-family: \u5b8b\u4f53; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'\">\u6216\u901a\u8fc7\u66f4\u6539\u5750\u6807\u539f\u70b9\u7684\u4f4d\u7f6e\u6765\u5e73\u8861\u5750\u6807\u8f74\u7684\u4f4d\u7f6e<\/span><br \/>\n <span lang=\"EN-US\"><br \/><\/span><br \/>\n<\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><span lang=\"EN-US\"><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #000000\">Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.CreateGraphics();<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5355\u8272\u586b\u5145<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">SolidBrush&nbsp;b1&nbsp;=&nbsp;new&nbsp;SolidBrush(Color.Blue);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9a\u4e49\u5355\u8272\u753b\u5237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">Pen&nbsp;p&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Pen(Color.Blue,<\/span><br \/>\n <span style=\"color: #800080\">1<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8f6c\u53d8\u5750\u6807\u8f74\u89d2\u5ea6<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #0000ff\">for<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(<\/span><br \/>\n <span style=\"color: #0000ff\">int<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;i&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">;&nbsp;i&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">&lt;<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">90<\/span><br \/>\n <span style=\"color: #000000\">;&nbsp;i<\/span><br \/>\n <span style=\"color: #000000\">++<\/span><br \/>\n <span style=\"color: #000000\">)<br \/><\/span><br \/>\n<\/span><br \/>\n<span id=\"Codehighlighter1_179_286_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;g.RotateTransform(i);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u6bcf\u65cb\u8f6c\u4e00\u5ea6\u5c31\u753b\u4e00\u6761\u7ebf<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;g.ResetTransform();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u6062\u590d\u5750\u6807\u8f74\u5750\u6807<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5e73\u79fb\u5750\u6807\u8f74<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.TranslateTransform(<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>g.ResetTransform();<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5148\u5e73\u79fb\u5230\u6307\u5b9a\u5750\u6807,\u7136\u540e\u8fdb\u884c\u5ea6\u65cb\u8f6c<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">g.TranslateTransform(<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,<\/span><br \/>\n <span style=\"color: #800080\">200<\/span><br \/>\n <span style=\"color: #000000\">);<br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #0000ff\">for<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(<\/span><br \/>\n <span style=\"color: #0000ff\">int<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;i&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">;&nbsp;i&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">&lt;<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">8<\/span><br \/>\n <span style=\"color: #000000\">;&nbsp;i<\/span><br \/>\n <span style=\"color: #000000\">++<\/span><br \/>\n <span style=\"color: #000000\">)<br \/><\/span><br \/>\n<span id=\"Codehighlighter1_456_511_Open_Text\"><span style=\"color: #000000\">{<br \/>g.RotateTransform(<\/span><br \/>\n <span style=\"color: #800080\">45<\/span><br \/>\n <span style=\"color: #000000\">);<br \/>g.DrawLine(p,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">100<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<br \/>}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>g.Dispose();<\/span><br \/>\n <\/strong>\n<\/div>\n<p align=\"left\" class=\"MsoNormal\" style=\"text-indent: 21.75pt; text-align: left; mso-layout-grid-align: none\"><strong>\u6211\u4eec\u5148\u6765\u505a\u4e00\u4e2a\u7b80\u5355\u7684----\u4effQQ\u622a\u56fe,\u5173\u4e8e\u8fd9\u4e2a\u7684\u4f8b\u5b50\u5176\u5b9e\u7f51\u4e0a\u5df2\u7ecf\u6709\u8fd9\u65b9\u9762\u7684\u8d44\u6599\u4e86,\u4f46\u662f\u4e3a\u4e86\u6587\u7ae0\u7684\u5b8c\u6574\u6027,\u8fd8\u662f\u89c9\u5f97\u6709\u5fc5\u8981\u8bb2\u89e3\uff0e<br \/>\u3000\u3000\u6211\u4eec\u5148\u6765\u770b\u4e00\u4e0b\u6548\u679c\uff1a<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\uff08\u56fe1\uff09<a href=\"\/notes\/content\/uploadfile\/201006\/dd3484737d7d9ddddbdc78f14f0f6b3920100618013952.jpg\" id=\"ematt:45\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/thum-dd3484737d7d9ddddbdc78f14f0f6b3920100618013952.jpg\" \/><\/a><br \/>\n&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"\/notes\/content\/uploadfile\/201006\/155b3dd2a2941c14af6978aadfbff02520100618014512.jpg\" id=\"ematt:49\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/thum-155b3dd2a2941c14af6978aadfbff02520100618014512.jpg\" \/><\/a><br \/>\n&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(\u56fe2)<\/p>\n<p>\u3000\u3000\u63a5\u4e0b\u6765\u770b\u770b\u8fd9\u662f\u5982\u4f55\u505a\u5230\u7684.\u3000<br \/>\u3000\u3000\u601d\u8def:\u804a\u5929\u7a97\u4f53\u4e0a\u6709\u4e00\u4e2a\u622a\u56fe\u6309\u94ae,\u70b9\u51fb\u6309\u94ae\u540e,\u7a0b\u5e8f\u5c06\u6574\u4e2a\u5c4f\u5e55\u753b\u5728\u4e00\u4e2a\u65b0\u7684\u5168\u5c4f\u7a97\u4f53\u4e0a,\u7136\u540e\u663e\u793a\u8fd9\u4e2a\u7a97\u4f53.\u56e0\u4e3a\u662f\u5168\u5c4f\u7684\u7a97\u4f53,\u5e76\u4e14\u9690\u85cf\u4e86\u83dc\u5355\u680f\u3001\u5de5\u5177\u680f\u7b49,\u6240\u4ee5\u5728\u6211\u4eec\u770b\u6765\u5c31\u597d\u50cf\u662f\u4e00\u4e2a\u684c\u9762\u7684\u622a\u56fe,\u7136\u540e\u5728\u8fd9\u4e2a\u65b0\u7a97\u4f53\u4e0a\u753b\u77e9\u5f62,\u6700\u540e\u4fdd\u5b58\u77e9\u5f62\u4e2d\u7684\u5185\u5bb9\u5e76\u663e\u793a\u5728\u539f\u6765\u7684\u804a\u5929\u7a97\u4f53\u4e2d.<br \/>\u3000\u3000\u6b65\u9aa4:<br \/>\u3000\u3000A.\u65b0\u5efa\u4e00\u4e2a\u7a97\u4f53\uff0e\u547d\u540d\u4e3aCatch.\u7136\u540e\u8bbe\u7f6e\u8fd9\u4e2a\u7a97\u4f53\u7684FormBorderStyle\u4e3aNone,WindowState\u4e3aMaximized\uff0e<br \/>\u3000\u3000B.\u6211\u4eec\u5bf9\u4ee3\u7801\u8fdb\u884c\u7f16\u8f91\uff1a<\/strong>\n<\/p>\n<p align=\"left\"><strong>\u3000\u3000C.\u521b\u5efa\u4e86Catch\u7a97\u4f53\u540e\uff0c\u6211\u4eec\u5728\u622a\u56fe\u6309\u94ae(\u4f4d\u4e8e\u804a\u5929\u7a97\u4f53\u4e0a)\u4e0a\u52a0\u5165\u4ee5\u4e0b\u4e8b\u4ef6\uff1a<\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;bCatch_Click(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;EventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_70_1277_Open_Text\"><span style=\"color: #000000\">{<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">if<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(bCatch_HideCurrent.Checked)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <\/span><br \/>\n<span id=\"Codehighlighter1_129_1266_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.Hide();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u9690\u85cf\u5f53\u524d\u7a97\u4f53<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thread.Sleep(<\/span><br \/>\n <span style=\"color: #800080\">50<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8ba9\u7ebf\u7a0b\u7761\u7720\u4e00\u6bb5\u65f6\u95f4\uff0c\u7a97\u4f53\u6d88\u5931\u9700\u8981\u4e00\u70b9\u65f6\u95f4<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Catch&nbsp;CatchForm&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Catch();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bitmap&nbsp;CatchBmp&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Bitmap(Screen.AllScreens[<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">].Bounds.Width,&nbsp;Screen.AllScreens[<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">].Bounds.Height);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u65b0\u5efa\u4e00\u4e2a\u548c\u5c4f\u5e55\u5927\u5c0f\u76f8\u540c\u7684\u56fe\u7247&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Graphics.FromImage(CatchBmp);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.CopyFromScreen(<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">),&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">),&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Size(Screen.AllScreens[<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">].Bounds.Width,&nbsp;Screen.AllScreens[<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">].Bounds.Height));<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u4fdd\u5b58\u5168\u5c4f\u56fe\u7247<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CatchForm.BackgroundImage&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;CatchBmp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5c06Catch\u7a97\u4f53\u7684\u80cc\u666f\u8bbe\u4e3a\u5168\u5c4f\u65f6\u7684\u56fe\u7247<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">if<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(CatchForm.ShowDialog()&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">==<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;DialogResult.OK)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <\/span><br \/>\n<span id=\"Codehighlighter1_783_1252_Open_Text\"><span style=\"color: #000000\">{<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5982\u679cCatch\u7a97\u4f53\u7ed3\u675f,\u5c31\u5c06\u526a\u8d34\u677f\u4e2d\u7684\u56fe\u7247\u653e\u5230\u4fe1\u606f\u53d1\u9001\u6846\u4e2d<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IDataObject&nbsp;iData&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Clipboard.GetDataObject();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataFormats.Format&nbsp;myFormat&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;DataFormats.GetFormat(DataFormats.Bitmap);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">if<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(iData.GetDataPresent(DataFormats.Bitmap))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <\/span><br \/>\n<span id=\"Codehighlighter1_1062_1193_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;richtextbox1.Paste(myFormat);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clipboard.Clear();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u6e05\u9664\u526a\u8d34\u677f\u4e2d\u7684\u5bf9\u8c61<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.Show();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u91cd\u65b0\u663e\u793a\u7a97\u4f53<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <span style=\"color: #000000\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <span style=\"color: #000000\"><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/strong>\n<\/div>\n<p align=\"left\"><strong>\u3000\u3000\u8fd9\u6837\u6211\u4eec\u7684\u622a\u56fe\u529f\u80fd\u4fbf\u5b8c\u6210\u4e86\uff0e<br \/>\u3000\u3000\u6211\u60f3\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\u5982\u4f55\u6d88\u53bb\u7b2c\u4e00\u6b21\u7ed8\u5236\u7684\u56fe\u7247\u662f\u4e2a\u6bd4\u8f83\u56f0\u96be\u7684\u95ee\u9898\uff0e\u5982\u679c\u6ca1\u6709\u91c7\u53d6\u63aa\u65bd\uff0c\u4f60\u4f1a\u53d1\u73b0\u53ea\u8981\u4f60\u9f20\u6807\u79fb\u52a8\uff0c\u5c31\u4f1a\u753b\u4e00\u4e2a\u77e9\u5f62\uff0c\u8fd9\u6837\u4fbf\u4f1a\u51fa\u73b0N\u591a\u7684\u77e9\u5f62\uff0c\u800c\u6211\u4eec\u53ea\u662f\u8981\u6700\u540e\u7684\u90a3\u4e00\u4e2a\uff0e<br \/>\u3000\u3000\u4e00\u822c\u89e3\u51b3\u8fd9\u79cd\u95ee\u9898\u7684\u65b9\u6cd5\u6709\u4e24\u79cd\uff1a<br \/>\u3000\u30001.\u5c31\u662f\u5728\u7ed8\u5236\u7b2c\u4e8c\u4e2a\u56fe\u5f62\u65f6\uff0c\u6211\u4eec\u5148\u7528\u4e0e\u5e95\u8272\u76f8\u540c\u7684\u989c\u8272\u5c06\u4e0a\u6b21\u7ed8\u5236\u7684\u56fe\u5f62\u91cd\u65b0\u7ed8\u5236\u4e00\u4e0b\uff0e\u4f46\u8fd9\u5f80\u5f80\u9700\u8981\u5e95\u8272\u4e3a\u7eaf\u8272\u65f6\u4f7f\u7528\uff0e<br \/>\u3000\u30002.\u6211\u4eec\u5e76\u4e0d\u76f4\u63a5\u5c06\u56fe\u5f62\u753b\u5728\u753b\u677f\u4e0a\uff0c\u6211\u4eec\u7528\u4e00\u4e2a\u56fe\u7247A\u6765\u4fdd\u5b58\u539f\u753b\u677f\u4e0a\u7684\u56fe\u7247\uff0e\u7136\u540e\u518d\u65b0\u5efa\u4e00\u4e2a\u4e0e\u56fe\u7247A\u76f8\u540c\u7684\u56fe\u7247B\uff0c\u5c06\u6211\u4eec\u8981\u7ed8\u5236\u7684\u56fe\u5f62\u753b\u5728\u8be5\u56fe\u7247B\u4e0a\uff0c\u7136\u540e\u518d\u5c06\u8be5\u56fe\u7247B\u753b\u5728\u753b\u677f\u4e0a\uff0e\u8fd9\u6837\u56fe\u7247A\u5e76\u6ca1\u6709\u88ab\u6539\u53d8\uff0e\u4e8e\u662f\u7b2c\u4e8c\u6b21\u753b\u7684\u65f6\u5019\u6211\u4eec\u8fd8\u662f\u540c\u6837\u65b0\u5efa\u4e00\u4e2a\u4e0e\u56fe\u7247A\u76f8\u540c\u7684\u56fe\u7247\u8fdb\u884c\u7ed8\u5236\uff0e\u90a3\u4e48\u4e0a\u4e00\u6b21\u7684\u56fe\u5f62\u5c31\u4e0d\u4f1a\u88ab\u4fdd\u7559\u4e0b\u6765\uff0e\u95ee\u9898\u4e5f\u5c31\u89e3\u51b3\u4e86\uff0e<\/p>\n<p>\u3000\u3000\u4e0b\u4e00\u6b21\uff0c\u5411\u5927\u5bb6\u4ecb\u7ecd\u5982\u4f55\u505a\u4e00\u4e2a\u4effwindows\u753b\u677f\u7684\u7a0b\u5e8f<\/strong>\n<\/p>\n<p align=\"left\" class=\"MsoNormal\" style=\"text-indent: 21.75pt; text-align: left; mso-layout-grid-align: none\">&nbsp;<\/p>\n<p align=\"left\" class=\"MsoNormal\" style=\"text-indent: 21.75pt; text-align: left; mso-layout-grid-align: none\"><strong>&nbsp;<\/strong>\n<\/p>\n<p>&nbsp;<\/p>\n<p align=\"left\" class=\"MsoNormal\" style=\"text-indent: 21.75pt; text-align: left; mso-layout-grid-align: none\"><strong>\u4e2a\u4eba\u8ba4\u4e3a\u5982\u679c\u60f3\u505a\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u7ed8\u56fe\u5de5\u5177\uff0c\u90a3\u4e48\u5355\u7eaf\u638c\u63e1GDI\u8fd8\u8fdc\u8fdc\u4e0d\u591f\uff0c\u6211\u7684\u76ee\u524d\u4e5f\u53ea\u80fd\u505a\u4e00\u4e2a\u6bd4\u8f83\u7b80\u5355\u7684\u7ed8\u56fe\u5de5\u5177\u4e86\uff0e\u4e0d\u8db3\u4e4b\u5904\uff0c\u6b22\u8fce\u5927\u5bb6\u8ba8\u8bba\uff01<\/p>\n<p>\u3000\u3000\u5148\u6765\u770b\u4e00\u4e0b\u6700\u7ec8\u6548\u679c\u5427\uff1a<br \/><\/strong>\n<\/p>\n<p><center><strong><a href=\"\/notes\/content\/uploadfile\/201006\/4feecfa422b81f77949a8b525478e82b20100618014133.jpg\" id=\"ematt:48\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/thum-4feecfa422b81f77949a8b525478e82b20100618014133.jpg\" \/><\/a><br \/>\n <\/strong><br \/>\n<\/center><\/p>\n<p><strong>\u3000\u3000<br \/>\u3000\u3000\u4e3b\u8981\u5b9e\u73b0\u529f\u80fd\uff1a\u753b\u76f4\u7ebf\uff0c\u77e9\u5f62\uff0c\u6a61\u76ae\uff0c\u5706\u5f62\uff0c\u5207\u6362\u989c\u8272\uff0c\u6253\u5f00\u56fe\u7247\uff0c\u4fdd\u5b58\u56fe\u7247\uff0c\u6e05\u9664\u56fe\u7247\uff0c\u624b\u52a8\u8c03\u8282\u753b\u5e03\u5927\u5c0f;\u8f6f\u4ef6\u521a\u542f\u52a8\u65f6\uff0c\u4e3a\u4e00\u5f20\u7a7a\u767d\u753b\u5e03\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5728\u753b\u5e03\u4e0a\u7ed8\u753b\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u83dc\u5355\u4e2d\u7684&ldquo;\u6253\u5f00&rdquo;\uff0c\u5bfc\u5165\u4e00\u5f20\u56fe\u7247\uff0c\u7136\u540e\u6211\u4eec\u5c31\u53ef\u4ee5\u5728\u8fd9\u5f20\u56fe\u7247\u4e0a\u8fdb\u884c\u7ed8\u5236\u3002<br \/>\u3000\u3000\u5e73\u53f0\uff1aVS2005 WINFORM<\/strong>\n<\/p>\n<p><strong>\u3000\u3000\u7531\u4e8e\u4ee3\u7801\u8fc7\u591a\uff0c\u5728\u8fd9\u91cc\u53ea\u7b80\u8981\u4ecb\u7ecd\u4e0b\u5236\u4f5c\u6b65\u9aa4\uff0c\u63d0\u4f9b\u5927\u5bb6\u5de5\u7a0b\u4e0b\u8f7d\uff0e<br \/>\u3000\u30001.\u5bf9\u6574\u4e2a\u754c\u9762\u8fdb\u884c\u5e03\u5c40\uff0e<br \/>\u3000\u30002.\u5b9e\u73b0\u7ed8\u56fe\u5de5\u5177\u7684\u529f\u80fd<br \/>\u3000\u30003.\u5b9e\u73b0\u989c\u8272\u62fe\u53d6\u7684\u529f\u80fd\uff0c\u8fd9\u91cc\u6211\u4eec\u76f4\u63a5\u62ff\u4e0a\u6b21\u5199\u7684\u81ea\u5b9a\u4e49\u63a7\u4ef6\u6765\u7528\uff0e<br \/>\u3000\u30004.\u5b9e\u73b0\u83dc\u5355\u529f\u80fd<br \/>\u3000\u30005.\u5b9e\u73b0\u624b\u52a8\u8c03\u8282\u753b\u5e03\u5927\u5c0f\u7684\u529f\u80fd<br \/>\u3000\u30006.\u6d4b\u8bd5&nbsp;<\/p>\n<p>\u3000\u3000<strong>\u5b9e\u73b0\u7ed8\u56fe\u5de5\u5177\u7684\u529f\u80fd<\/strong><br \/>\n <br \/>\u3000\u3000\u4e3a\u4e86\u8ba9\u4ee3\u7801\u85d5\u5408\u5ea6\u5c0f\u70b9\uff0c\u7a0d\u8bb8\u7528\u4e86\u4e9b\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u56e0\u4e3a\u4e0d\u662f\u5f88\u4f1a\uff0c\u6240\u4ee5\u4ee3\u7801\u8fd8\u662f\u6709\u70b9\u4e71\u4e71\u7684\uff0c\u563f\u563f\uff01\u5173\u4e8e\u7ed8\u56fe\u5de5\u5177\u7684\u8fd9\u4e9b\u529f\u80fd\u5757\u5168\u90e8\u5199\u5728\u4e86DrawTools\u8fd9\u4e2a\u7c7b\u91cc\uff0e\u90a3\u4e48\u5728\u4e3b\u7a97\u4f53\u4e2d\uff0c\u53ea\u9700\u8981\u8c03\u7528\u8fd9\u4e2a\u7c7b\u6765\u5b8c\u6210\u7ed8\u5236\u5c31\u884c\u4e86\uff0c\u800c\u4e0d\u9700\u8981\u8fc7\u591a\u7684\u6d89\u53ca\u5230\u5177\u4f53\u7684\u7ed8\u56fe\u4ee3\u7801\u3002\u7ed8\u56fe\u5de5\u5177\u8fd9\u4e2a\u7c7b\u63d0\u4f9b\u7684\u4e3b\u8981\u5de5\u5177\u5c31\u662f\uff1a\u94c5\u7b14\u3001\u6a61\u76ae\u3001\u76f4\u7ebf\u3001\u77e9\u5f62\u3001\u5706\u5f62\u3001\u5b9e\u5fc3\u77e9\u5f62\u3001\u5b9e\u5fc3\u5706\u5f62\u3002\u5173\u4e8e\u8fd9\u4e9b\u529f\u80fd\u5757\u7684\u4ee3\u7801\uff0c\u5e76\u4e0d\u96be\uff0c\u53ea\u8981\u5927\u5bb6\u5bf9\u8ba4\u771f\u770b\u8fc7\u524d\u51e0\u7bc7\u5185\u5bb9\uff0c\u90a3\u5e94\u8be5\u90fd\u770b\u5f97\u61c2\u3002<br \/>\u3000\u3000\u8fd9\u91cc\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<br \/>\u3000\u3000\uff11.\u5982\u4f55\u9632\u6b62\u8bb0\u5f55\u4e0d\u5fc5\u8981\u7684\u7ed8\u56fe\u8fc7\u7a0b\u4e2d\u7684\u75d5\u8ff9\uff1f<br \/>\u3000\u3000\u8fd9\u4e2a\u95ee\u9898\u5728<a href=\"http:\/\/www.cnblogs.com\/stg609\/archive\/2008\/03\/19\/1113694.html\" title=\"c# GDI+\u7b80\u5355\u7ed8\u56fe\uff08\u4e09\uff09\"><font color=\"#78afd3\">\u7b2c\u4e09\u7bc7<\/font><br \/>\n <\/a><br \/>\n\u4e2d\u6709\u63d0\u5230\u8fc7\uff0c\u5927\u5bb6\u4e0d\u59a8\u5148\u53bb\u770b\u770b\u90a3\u4e00\u7bc7\u3002\u4e3a\u4e86\u8ba9\u4ee3\u7801\u770b\u8d77\u6765\u53ef\u8bfb\u6027\u9ad8\u70b9\uff0c\u6211\u8bbe\u7f6e\u4e86\u4e24\u4e2aImage\u53d8\u91cf\uff0cfinishingImg<font face=\"Verdana\">\u7528\u6765\u4fdd\u5b58\u7ed8\u56fe\u8fc7\u7a0b\u4e2d\u7684\u75d5\u8ff9\uff0c<font face=\"Verdana\">orginalImg\u7528\u6765\u4fdd\u5b58\u5df2\u5b8c\u6210\u7684\u7ed8\u56fe\u8fc7\u7a0b\u548c\u521d\u59cb\u65f6\u7684\u80cc\u666f\u56fe\u7247\u3002<br \/>\u3000\u30002.\u8fd9\u4e2a\u7c7b\u5982\u4f55\u4e0e\u4e3b\u7a97\u4f53\u8fdb\u884c\u901a\u4fe1\uff1f<br \/>\u3000\u3000\u5f53\u7136\u5982\u679c\u76f4\u63a5\u5c06\u8fd9\u4e9b\u529f\u80fd\u5757\u5199\u5728\u4e3b\u7a97\u4f53\u4e2d\u81ea\u7136\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898\u3002\u4f46\u662f\u90a3\u6837\u4ee3\u7801\u4f1a\u663e\u5f97\u5f88\u6df7\u6742\uff0c\u5982\u679c\u53ea\u662f\u5de5\u5177\u4ee3\u7801\u51fa\u73b0\u95ee\u9898\u5c31\u9700\u8981\u6539\u6574\u4e2a\u9879\u76ee\u3002\u6211\u5728\u8fd9\u91cc\u901a\u8fc7\u5b9a\u4e49\u65b9\u6cd5\u548c\u5c5e\u6027\uff0c\u8ba9\u4e3b\u7a97\u4f53\u901a\u8fc7\u7ed9\u5c5e\u6027\u8d4b\u503c\u5c06\u753b\u677f\u753b\u5e03\u4ee5\u53ca\u989c\u8272\u4ec0\u4e48\u7684\u4fe1\u606f\u4f20\u7ed9\u8fd9\u4e2a\u5de5\u5177\u7c7b\uff0c\u7136\u540e\u901a\u8fc7\u8c03\u7528\u76f8\u5e94\u7684\u5de5\u5177\u65b9\u6cd5\u6765\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u3002<br \/>\u3000\u30003.\u5173\u952e\u5c5e\u6027<br \/>\u3000\u3000\u8981\u60f3\u8ba9\u8fd9\u4e9b\u5de5\u5177\u80fd\u6b63\u5e38\u4f7f\u7528\uff0c\u5fc5\u987b\u4f20\u9012\u7ed9\u4ed6\u4ee5\u4e0b\u51e0\u6837\u4e1c\u897f\uff1a\u76ee\u6807\u753b\u677f\uff08\u4e5f\u5c31\u662fpicturebox\uff09\uff0c\u7ed8\u56fe\u989c\u8272\uff0c\u539f\u59cb\u753b\u5e03\u3002<\/font><br \/>\n <\/font><\/p>\n<p>\u3000\u3000<strong>\u5b9e\u73b0\u83dc\u5355\u529f\u80fd<br \/><\/strong><br \/>\n\u3000\u3000<a href=\"\/notes\/content\/uploadfile\/201006\/6d4af7fbdc53986f1cf66609d55686a220100618014133.jpg\" id=\"ematt:46\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/6d4af7fbdc53986f1cf66609d55686a220100618014133.jpg\" \/><\/a><br \/>\n <br \/>\u3000\u3000\u8fd9\u91cc\u5c31\u9700\u8981\u6211\u4eec\u5bf9\u6587\u4ef6\u7684\u64cd\u4f5c\u6709\u4e00\u70b9\u4e86\u89e3\uff0c\u5927\u5bb6\u53ef\u4ee5\u53bb\u67e5\u4e00\u4e0b\u76f8\u5173\u8d44\u6599\u3002<br \/>\u3000\u3000\u96be\u70b9\u4e3b\u8981\u5c31\u662f&ldquo;\u6253\u5f00&rdquo;\u8fd9\u4e2a\u83dc\u5355\u9879\u7684\u5b9e\u73b0<br \/>\u3000\u3000\u6211\u4eec\u8981\u5b9e\u73b0\u5c06\u6253\u5f00\u540e\u7684\u56fe\u7247\u5728\u4fee\u6539\u540e\u91cd\u65b0\u4fdd\u5b58\u5c31\u5fc5\u987b\u8ba9\u6587\u4ef6\u5728\u6253\u5f00\u540e\u5c31\u80fd\u5173\u95ed\uff0c\u5426\u5219\u5c31\u4f1a\u56e0\u4e3a\u6587\u4ef6\u6253\u5f00\u800c\u65e0\u6cd5\u8986\u76d6\u539f\u6587\u4ef6\u3002\u5c31\u4f1a\u5bfc\u81f4\u7f16\u8bd1\u65f6\u5f39\u51fa&ldquo;GDI\u3000 \u4e00\u822c\u6027\u9519\u8bef&rdquo;\u3002\u6240\u4ee5\u6839\u636e\u7f51\u4e0a\u5176\u5b83\u670b\u53cb\u7684\u505a\u6cd5\u5c31\u662f\u5148\u5c06\u6253\u5f00\u7684\u56fe\u7247\u901a\u8fc7GDI+\u5c06\u56fe\u7247\u753b\u5230\u53e6\u4e00\u4e2a\u753b\u5e03\u4e0a\uff0c\u7136\u540e\u53ca\u65f6\u5173\u95ed\u6253\u5f00\u7684\u56fe\u7247\u548c\u7528\u6765\u7ed8\u5236\u8be5\u56fe\u7247\u7684\u753b\u677f\u3002<font face=\"Verdana\">\u8be6\u89c1<a href=\"http:\/\/www.wanxin.org\/redirect.php?tid=3&amp;goto=lastpost\"><font color=\"#78afd3\">http:\/\/www.wanxin.org\/redirect.php?tid=3&amp;goto=lastpost<\/font><br \/>\n <\/a><br \/>\n<\/font><br \/>\n<\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><font color=\"#78afd3\"><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/font><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;openPic_Click(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;EventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_64_1615_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OpenFileDialog&nbsp;ofd&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;OpenFileDialog();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5b9e\u4f8b\u5316\u6587\u4ef6\u6253\u5f00\u5bf9\u8bdd\u6846<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ofd.Filter&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #800000\">JPG|*.jpg|Bmp|*.bmp|\u6240\u6709\u6587\u4ef6|*.*<\/span><br \/>\n <span style=\"color: #800000\">&quot;<\/span><br \/>\n <span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8bbe\u7f6e\u5bf9\u8bdd\u6846\u6253\u5f00\u6587\u4ef6\u7684\u62ec\u5c55\u540d<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">if<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(ofd.ShowDialog()&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">==<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;DialogResult.OK)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <\/span><br \/>\n<span id=\"Codehighlighter1_270_1605_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bitmap&nbsp;bmpformfile&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Bitmap(ofd.FileName);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u83b7\u53d6\u6253\u5f00\u7684\u6587\u4ef6<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;panel2.AutoScrollPosition&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5c06\u6eda\u52a8\u6761\u590d\u4f4d<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pbImg.Size&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;bmpformfile.Size;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8c03\u6574\u7ed8\u56fe\u533a\u5927\u5c0f\u4e3a\u56fe\u7247\u5927\u5c0f<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reSize.Location&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(bmpformfile.Width,&nbsp;bmpformfile.Height);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">reSize\u4e3a\u6211\u7528\u6765\u5b9e\u73b0\u624b\u52a8\u8c03\u8282\u753b\u5e03\u5927\u5c0f\u7528\u7684<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u56e0\u4e3a\u6211\u4eec\u521d\u59cb\u65f6\u7684\u7a7a\u767d\u753b\u5e03\u5927\u5c0f\u6709\u9650\uff0c&quot;\u6253\u5f00&quot;\u64cd\u4f5c\u53ef\u80fd\u5f15\u8d77\u753b\u677f\u5927\u5c0f\u6539\u53d8\uff0c\u6240\u4ee5\u8981\u5c06\u753b\u677f\u91cd\u65b0\u4f20\u5165\u5de5\u5177\u7c7b<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dt.DrawTools_Graphics&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;pbImg.CreateGraphics();<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bitmap&nbsp;bmp&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Bitmap(pbImg.Width,&nbsp;pbImg.Height);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Graphics.FromImage(bmp);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.FillRectangle(<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;SolidBrush(pbImg.BackColor),&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Rectangle(<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;pbImg.Width,&nbsp;pbImg.Height));<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u4e0d\u4f7f\u7528\u8fd9\u53e5\u8bdd\uff0c\u90a3\u4e48\u8fd9\u4e2abmp\u7684\u80cc\u666f\u5c31\u662f\u900f\u660e\u7684<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawImage(bmpformfile,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,bmpformfile.Width,bmpformfile.Height);<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5c06\u56fe\u7247\u753b\u5230\u753b\u677f\u4e0a<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.Dispose();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u91ca\u653e\u753b\u677f\u6240\u5360\u8d44\u6e90<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u4e0d\u76f4\u63a5\u4f7f\u7528pbImg.Image&nbsp;=&nbsp;Image.FormFile(ofd.FileName)\u662f\u56e0\u4e3a\u8fd9\u6837\u4f1a\u8ba9\u56fe\u7247\u4e00\u76f4\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4e5f\u5c31\u65e0\u6cd5\u4fdd\u5b58\u4fee\u6539\u540e\u7684\u56fe\u7247<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmpformfile.Dispose();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u91ca\u653e\u56fe\u7247\u6240\u5360\u8d44\u6e90<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;pbImg.CreateGraphics();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawImage(bmp,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.Dispose();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dt.OrginalImg&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;bmp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmp.Dispose();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sFileName&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;ofd.FileName;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u50a8\u5b58\u6253\u5f00\u7684\u56fe\u7247\u6587\u4ef6\u7684\u8be6\u7ec6\u8def\u5f84\uff0c\u7528\u6765\u7a0d\u540e\u80fd\u8986\u76d6\u8fd9\u4e2a\u6587\u4ef6<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ofd.Dispose();<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/strong>\n<\/div>\n<p><strong>\u3000\u3000\u6e05\u9664\u56fe\u50cf\u5176\u5b9e\u5c31\u662f\u7528\u767d\u8272\u586b\u5145\u6574\u4e2a\u753b\u5e03<br \/>\u3000\u3000\u5176\u5b83\u7684\u90fd\u6bd4\u8f83\u7b80\u5355\uff0c\u8fd9\u5c31\u4e0d\u5177\u4f53\u8bb2\u4e86\u3002<\/p>\n<p>\u3000\u3000<strong>\u5b9e\u73b0\u624b\u52a8\u8c03\u8282\u753b\u5e03\u5927\u5c0f<br \/>\u3000\u3000<\/strong><br \/>\n \u7f51\u4e0a\u6709\u4eba\u8bf4\u4f7f\u7528API\uff0c\u4f46\u662f\u4e2a\u4eba\u89c9\u5f97\u8fd8\u662f\u4f7f\u7528\u5176\u5b83\u63a7\u4ef6\u5e2e\u5fd9\u6bd4\u8f83\u7b80\u5355\uff0c\u81f3\u5c11\u6211\u4eec\u8fd8\u770b\u5f97\u61c2\u3002<br \/>\u3000\u3000\u601d\u8def\uff1a\u653e\u7f6e\u4e00\u4e2apicturebox1(\u5c3a\u5bf8\u4e3a5*5)\uff0c\u5c06\u5b83\u56fa\u5b9a\u5728\u4e3b\u753b\u677f\u7684\u53f3\u4e0b\u89d2\uff0c\u7136\u540e\u6539\u53d8\u9f20\u6807\u8fdb\u5165\u65f6\u7684Cursor\u4e3a\u7bad\u5934\u5f62\u72b6\uff0c\u8bbe\u7f6e\u9f20\u6807\u6309\u4e0b\u79fb\u52a8\u65f6\u7684\u4e8b\u4ef6\uff0c\u8ba9\u8be5picturebox1 \u8ddf\u968f\u9f20\u6807\u79fb\u52a8\u3002\u5f53\u9f20\u6807\u677e\u5f00\u65f6\uff0c\u5c06\u4e3b\u753b\u677f\u7684\u53f3\u4e0b\u89d2\u5750\u6807\u8c03\u6574\u4e3apicturebox1\u7684\u5750\u6807\u3002<br \/>\u3000\u3000\u4e0b\u9762\u6765\u770b\u4e0b\u4ee3\u7801\uff1a<br \/>\u3000\u3000\u5176\u4e2d\u7684reSize\u5c31\u662f\u6211\u4eec\u7528\u6765\u5e2e\u5fd9\u7684picturebox\u63a7\u4ef6\u3000<\/strong>\n<\/p>\n<div style=\"border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee\"><strong><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">bool<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;bReSize&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">false<\/span><br \/>\n <span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u662f\u5426\u6539\u53d8\u753b\u5e03\u5927\u5c0f<\/span><br \/>\n <span style=\"color: #008000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><\/span><br \/>\n <span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;reSize_MouseDown(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;MouseEventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_127_184_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bReSize&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">true<\/span><br \/>\n <span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5f53\u9f20\u6807\u6309\u4e0b\u65f6\uff0c\u8bf4\u660e\u8981\u5f00\u59cb\u8c03\u8282\u5927\u5c0f<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;reSize_MouseMove(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;MouseEventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_265_425_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">if<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(bReSize)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <\/span><br \/>\n<span id=\"Codehighlighter1_304_415_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reSize.Location&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Point(reSize.Location.X&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">+<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;e.X,&nbsp;reSize.Location.Y&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">+<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;e.Y);<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<span style=\"color: #000000\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <span style=\"color: #000000\"><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/><br \/><img decoding=\"async\" align=\"top\" alt=\"\" src=\"http:\/\/www.cnblogs.com\/Images\/OutliningIndicators\/None.gif\" \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">private<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">void<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;reSize_MouseUp(<\/span><br \/>\n <span style=\"color: #0000ff\">object<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;sender,&nbsp;MouseEventArgs&nbsp;e)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span id=\"Codehighlighter1_504_1577_Open_Text\"><span style=\"color: #000000\">{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bReSize&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">false<\/span><br \/>\n <span style=\"color: #000000\">;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u5927\u5c0f\u6539\u53d8\u7ed3\u675f<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8c03\u8282\u5927\u5c0f\u53ef\u80fd\u9020\u6210\u753b\u677f\u5927\u5c0f\u8d85\u8fc7\u5c4f\u5e55\u533a\u57df\uff0c\u6240\u4ee5\u4e8b\u5148\u8981\u8bbe\u7f6eautoScroll\u4e3atrue.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u4f46\u662f\u6eda\u52a8\u6761\u7684\u51fa\u73b0\u53cd\u800c\u589e\u52a0\u4e86\u6211\u4eec\u7684\u96be\u5ea6\uff0c\u56e0\u4e3a\u6eda\u52a8\u6761\u4e0a\u4e0b\u79fb\u52a8\u5e76\u4e0d\u4f1a\u81ea\u52a8\u5e2e\u6211\u4eec\u8c03\u6574\u56fe\u7247\u7684\u5750\u6807\u3002<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8fd9\u662f\u56e0\u4e3aGDI\u7ed8\u56fe\u7684\u5750\u6807\u7cfb\u4e0d\u53ea\u4e00\u4e2a\uff0c\u597d\u50cf\u6709\u4e09\u4e2a\uff0c\u6ca1\u6709\u4ed4\u7ec6\u4e86\u89e3\uff0c\u4e00\u4e2a\u662f\u5c4f\u5e55\u5750\u6807\uff0c\u4e00\u4e2a\u662f\u5ba2\u6237\u533a\u5750\u6807\uff0c\u8fd8\u4e2a\u662f\u6587\u6863\u5750\u6807\u3002<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u6eda\u52a8\u6761\u7684\u4e0a\u4e0b\u79fb\u52a8\u6539\u53d8\u7684\u662f\u6587\u6863\u7684\u5750\u6807\uff0c\u4f46\u662f\u5ba2\u6237\u533a\u5750\u6807\u4e0d\u53d8\uff0c\u800clocation\u5c5e\u6027\u5c31\u5c5e\u4e8e\u5ba2\u6237\u533a\u5750\u6807\uff0c\u6240\u4ee5\u6211\u4eec\u76f4\u63a5\u8ba1\u7b97\u4f1a\u51fa\u73b0\u9519\u8bef<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u8fd9\u65f6\u6211\u4eec\u5c31\u9700\u8981\u77e5\u9053\u6587\u6863\u5750\u6807\u4e0e\u5ba2\u6237\u533a\u5750\u6807\u7684\u504f\u79fb\u91cf\uff0c\u8fd9\u5c31\u662fAutoScrollPostion\u53ef\u4ee5\u63d0\u4f9b\u7684<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\"><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pbImg.Size&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Size(reSize.Location.X&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">-<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.panel2.AutoScrollPosition.X),&nbsp;reSize.Location.Y&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">-<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;(<\/span><br \/>\n <span style=\"color: #0000ff\">this<\/span><br \/>\n <span style=\"color: #000000\">.panel2.AutoScrollPosition.Y));<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dt.DrawTools_Graphics&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;pbImg.CreateGraphics();<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u56e0\u4e3a\u753b\u677f\u7684\u5927\u5c0f\u88ab\u6539\u53d8\u6240\u4ee5\u5fc5\u987b\u91cd\u65b0\u8d4b\u503c<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><br \/>\n <span style=\"color: #008000\">\/\/<\/span><br \/>\n <span style=\"color: #008000\">\u53e6\u5916\u753b\u5e03\u4e5f\u88ab\u6539\u53d8\u6240\u4ee5\u4e5f\u8981\u91cd\u65b0\u8d4b\u503c<\/span><br \/>\n <span style=\"color: #008000\"><br \/><\/span><br \/>\n<span style=\"color: #000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bitmap&nbsp;bmp&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Bitmap(pbImg.Width,&nbsp;pbImg.Height);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;Graphics.FromImage(bmp);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.FillRectangle(<\/span><br \/>\n <span style=\"color: #0000ff\">new<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;SolidBrush(Color.White),&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;pbImg.Width,&nbsp;pbImg.Height);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawImage(dt.OrginalImg,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.Dispose();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;pbImg.CreateGraphics();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.DrawImage(bmp,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">,&nbsp;<\/span><br \/>\n <span style=\"color: #800080\">0<\/span><br \/>\n <span style=\"color: #000000\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g.Dispose();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dt.OrginalImg&nbsp;<\/span><br \/>\n <span style=\"color: #000000\">=<\/span><br \/>\n <span style=\"color: #000000\">&nbsp;bmp;<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bmp.Dispose();<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br \/>\n <\/span><br \/>\n<\/strong>\n<\/div>\n<p><strong>\u3000\u3000\u6548\u679c\u5982\u4e0b\u56fe\uff08\u4ed4\u7ec6\u770b\u767d\u8272\u533a\u57df\u7684\u53f3\u4e0b\u89d2\uff09\uff1a<br \/>\u3000\u3000<a href=\"\/notes\/content\/uploadfile\/201006\/12ad5ace0628b8b221a0a141e8fd570620100618014133.jpg\" id=\"ematt:47\" target=\"_blank\"><img decoding=\"async\" alt=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" border=\"0\" src=\"\/notes\/content\/uploadfile\/201006\/12ad5ace0628b8b221a0a141e8fd570620100618014133.jpg\" \/><\/a><br \/>\n <br \/>\u3000\u3000\u6b64\u65f6\u5c31\u53ef\u4ee5\u901a\u8fc7\u62d6\u52a8\u90a3\u4e2a\u5c0f\u65b9\u5757\u6765\u8c03\u8282\u56fe\u7247\u5927\u5c0f\u4e86<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p><font face=\"\u5b8b\u4f53\" size=\"2\">\u6700\u8fd1\u5bf9<\/font><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">GDI+<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8fd9\u4e2a\u4e1c\u897f\u63a5\u89e6\u7684\u6bd4\u8f83\u591a\uff0c\u4e5f\u505a\u4e86\u4e9b\u7b80\u5355\u7684\u5b9e\u4f8b\uff0c\u6bd4\u5982\u7ed8\u56fe\u677f\uff0c\u4eff<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">QQ<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u622a\u56fe\u7b49\uff0e<\/span>\n<\/p>\n<p align=\"left\" style=\"text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u3000\u3000\u6700\u65e9\u63a5\u89e6\u8fd9\u4e2a\u7c7b\uff0c\u662f\u56e0\u4e3a\u60f3\u505a\u4eff<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">QQ<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u622a\u56fe\u7684\u6548\u679c\uff0e\u5de7\u7684\u5f88\uff0c\u5b66\u4f1a\u4e86\u5982\u4f55\u505a\u622a\u56fe\u540e\uff0c<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">.NET<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8bfe\u5802\u4e0a\u8001\u5e08\u4e5f\u6b63\u5de7\u8981\u8bb2\u5173\u4e8e<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">c#<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u7ed8\u56fe\u65b9\u9762\u7684\u77e5\u8bc6\uff0c\u5e76\u4e14\u6211\u81ea\u5df1\u53c8\u5728\u7f51\u4e0a\u5b66\u4e60\u91d1\u8001\u5e08\u7684\u57f9\u8bad\u73ed\uff0c\u4e5f\u662f\u8981\u7528\u5230\u8fd9\u4e2a\u7c7b\uff0e\u5728\u5b66\u4e60\u4e2d\u6709\u4e00\u4e9b\u4f53\u4f1a\uff0c\u6240\u4ee5\u51c6\u5907\u628a\u8fd9\u4e9b\u4f53\u4f1a\u8bb0\u4e0b\u6765\uff0c\u56e0\u4e3a\u5185\u5bb9\u6bd4\u8f83\u591a\uff0c\u53ef\u80fd\u6211\u4f1a\u5206\u51e0\u6b21\u5199\uff0e<\/span>\n<\/p>\n<p align=\"left\" style=\"margin-left: 18pt; text-indent: -18pt; text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u3000\u3000\u5e9f\u8bdd\u4e0d\u591a\u8bf4\u4e86\uff0c\u6211\u4eec\u5148\u6765\u8ba4\u8bc6\u4e00\u4e0b\u8fd9\u4e2a<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">GDI+<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\uff0c\u770b\u770b\u5b83\u5230\u5e95\u957f\u4ec0\u4e48\u6837<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">.<\/span>\n<\/p>\n<p align=\"left\" style=\"text-indent: 18pt; text-align: left\"><span style=\"font-size: 9pt; color: blue; font-family: arial\">GDI+<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff1a<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Graphics Device Interface Plus<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u4e5f\u5c31\u662f\u56fe\u5f62\u8bbe\u5907\u63a5\u53e3<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">,<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u63d0\u4f9b\u4e86\u5404\u79cd\u4e30\u5bcc\u7684\u56fe\u5f62\u56fe\u50cf\u5904\u7406\u529f\u80fd<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">;<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u5728<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">C#.NET<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u4e2d\uff0c\u4f7f\u7528<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">GDI+<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u5904\u7406\u4e8c\u7ef4\uff08<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">2D<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff09\u7684\u56fe\u5f62\u548c\u56fe\u50cf\uff0c\u4f7f\u7528<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">DirectX<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u5904\u7406\u4e09\u7ef4\uff08<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">3D<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff09\u7684\u56fe\u5f62\u56fe\u50cf<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">,<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u56fe\u5f62\u56fe\u50cf\u5904\u7406\u7528\u5230\u7684\u4e3b\u8981\u547d\u540d\u7a7a\u95f4\u662f<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">System . Drawing<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\uff1a\u63d0\u4f9b\u4e86\u5bf9<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">GDI+<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u57fa\u672c\u56fe\u5f62\u529f\u80fd\u7684\u8bbf\u95ee\uff0c\u4e3b\u8981\u6709<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Graphics<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Bitmap<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001\u4ece<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Brush<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u7ee7\u627f\u7684\u7c7b\u3001<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Font<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Icon<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Image<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Pen<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u3001<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">Color<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: \u5b8b\u4f53\">\u7c7b\u7b49<\/span><br \/>\n<span style=\"font-size: 9pt; color: blue; font-family: arial\">.<\/span>\n<\/p>\n<p align=\"left\" style=\"margin-left: 0.05pt; text-indent: 18pt; text-align: left\"><span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5927\u6982\u4e86\u89e3\u4e86\u4ec0\u4e48\u662f<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">GDI+<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u540e<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u6211\u4eec\u6765\u770b\u4e00\u4e0b\u7ed8\u56fe\u8981\u7528\u5230\u7684\u4e3b\u8981\u5de5\u5177<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u8981\u753b\u56fe<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u80af\u5b9a\u8981<span style=\"color: blue\">\u753b\u677f<\/span><br \/>\n \u5427<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">,<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u5728<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">C#<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: \u5b8b\u4f53\">\u4e2d\u753b\u677f\u53ef\u4ee5\u901a\u8fc7<\/span><br \/>\n<span style=\"font-size: 9pt; font-family: arial\">Graphic...<\/span>\n<\/p>\n<p> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/125\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[273],"tags":[16,47],"class_list":["post-125","post","type-post","status-publish","format-standard","hentry","category-article","tag-C","tag-GDI"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}