您好,
实现的思路是从DLL取到这个资源,然后设置到需要的地方
- private void button1_Click(object sender, EventArgs e)
- {
- Cursor c = LoadSpreadCursor("FarPoint.Win.Spread.default.cur");
- fpSpread1.SetCursor(FarPoint.Win.Spread.CursorType.ColumnHeader, c);
- }
- private Cursor LoadSpreadCursor(string name)
- {
- Assembly sourceAssembly = typeof(FarPoint.Win.Spread.FpSpread).Assembly;
- Stream manifestResourceStream = sourceAssembly.GetManifestResourceStream(name);
- Cursor cursor = new Cursor(manifestResourceStream);
- manifestResourceStream.Close();
- manifestResourceStream.Dispose();
- return cursor;
- }
复制代码 |