forked from yaunqiying/EasyCharts
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathXlWookbookHelperOther.cs
51 lines (45 loc) · 1.1 KB
/
XlWookbookHelperOther.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace ExcelAddIn_Graphics
{
public partial class XlWorkbookHelper
{
//【屏幕参数】
public int CXFRAME
{
get
{
//获得系统窗口X方向边框大小
return GetSystemMetrics(SM_CXFRAME);
}
}
public int CYFRAME
{
get
{
//获得系统窗口Y方向边框大小
return GetSystemMetrics(SM_CYFRAME);
}
}
//【图形接口】
public System.Drawing.Graphics GS_Screen
{
get
{
IntPtr handle = GetDC(HWND_SCREEN);
return System.Drawing.Graphics.FromHdc(handle);
}
}
public System.Drawing.Graphics GS_Excel
{
get
{
IntPtr handle = GetDC(HWND_WinWorkbook);
return System.Drawing.Graphics.FromHdc(handle);
}
}
}
}