📄 win32api.cs
字号:
using System;
using System.Drawing;
using System.Runtime.InteropServices;
namespace VCSharp
{
/// <summary>
/// Win32API 的摘要说明。
/// </summary>
public class Win32API
{
public Win32API()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
[StructLayout(LayoutKind.Sequential)] public struct LPPOINT
{
long x;
long y;
}
[DllImportAttribute("gdi32.dll")]
public static extern bool SetROP2(IntPtr hdc, int nDrawMode);
[DllImport("gdi32.dll")]
public static extern bool GetROP2(IntPtr hdc);
[DllImport("gdi32.dll")]
public static extern long CreatePen(int nPenStyle,
int nWidth,int crColor);
[DllImport("gdi32.dll")]
public static extern long CreateSolidBrush(int crColor);
[DllImport("gdi32.dll")]
public static extern long GetStockObject(int nIndex);
[DllImport("gdi32.dll")]
public static extern long SelectObject(IntPtr hdc,
long hObject);
[DllImport("gdi32.dll")]
public static extern long DeleteObject(long hObject);
[DllImport("gdi32.dll")]
public static extern bool MoveToEx(IntPtr hdc,
int x,int y,LPPOINT lpPoint);
[DllImport("gdi32.dll")]
public static extern bool LineTo (IntPtr hdc,
int x,int y );
[DllImport("gdi32.dll")]
public static extern bool Rectangle(IntPtr hdc,
int X1, int Y1,int X2,int Y2);
[DllImport("gdi32.dll")]
public static extern bool Ellipse(IntPtr hdc, int X1,
int Y1, int X2,int Y2);
[DllImport("gdi32.dll")]
public static extern bool Arc
(IntPtr hdc,int X1,int Y1,
int X2,int Y2,int X3,
int Y3,int X4,int Y4);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -