| 发表于:2007-02-13 00:02:094楼 得分:50 |
例: public sealed class testcursor{ static cursor columnwidthcursor; public testcursor(){} static cursor getcursor(string cursorname) { cursor cursor1 = null; try { type type1 = typeof(testcursors); stream stream1 = type1.module.assembly.getmanifestresourcestream(cursorname); cursor1 = new cursor(stream1); } catch (exception exception1) { messagebox.show(exception1.message); throw exception1; } return cursor1; } } public static cursor excelcellcursor { get { if (columnwidthcursor== null) { columnwidthcursor= getcursor( "width.cur "); } return columnwidthcursor; } set { columnwidthcursor= value; }} //还可以定义其他的,自己可以添加了试一下。 } | | |
|