整理的C#调用winapi的静态方法..无错版附件中有一个枚举类不存在,请自行在核心代码中查找
#region CPU public struct CPUInformation { public uint core; public string type; public uint level2; public uint masterfrequency; } #endregion #region Memory public struct MemoryInformation { public double AvailablePageFile; public double AvailablePhysicalMemory; public double AvailableVirtualMemory; public uint SizeofStructure; public double MemoryInUse; public double TotalPageSize; public double TotalPhysicalMemory; public double TotalVirtualMemory; } #endregion #region RECT [Serializable, StructLayout(LayoutKind.Sequential)] public struct RECT { public int left; public int top; public int right; public int bottom; } #endregion #region SYSTEMTIME public struct SYSTEMTIME { public ushort wYear; public ushort wMonth; public ushort wDayOfWeek; public ushort wDay; public ushort wHour; public ushort wMinute; public ushort wSecond; public ushort wMilliseconds; } #endregion #region WINDOWPLACEMENT [StructLayout(LayoutKind.Sequential)] public struct WINDOWPLACEMENT { public int length; public int flags; public int showCmd; public Point ptMinPosition; public Point ptMaxPosition; public RECT rcNormalPosition; //public int ptMinPosition_x; //public int ptMinPosition_y; //public int ptMaxPosition_x; //public int ptMaxPosition_y; //public int rcNormalPosition_left; //public int rcNormalPosition_top; //public int rcNormalPosition_right; //public int rcNormalPosition_bottom; } #endregion #region OFSTRUCT [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct OFSTRUCT { public byte cBytes; public byte fFixedDisk; public UInt16 nErrCode; public UInt16 Reserved1; public UInt16 Reserved2; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)] public string szPathName; } #endregion #region _SHFILEOPSTRUCT [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public class _SHFILEOPSTRUCT { public IntPtr hwnd; public UInt32 wFunc; public string pFrom; public string pTo; public UInt16 fFlags; public Int32 fAnyOperationsAborted; public IntPtr hNameMappings; public string lpszProgressTitle; } #endregion #region COPYDATASTRUCT public struct COPYDATASTRUCT { public IntPtr dwData; public int cbData; [MarshalAs(UnmanagedType.LPStr)] public string lpData; } #endregion #region WindowInfo public struct WindowInfo { public IntPtr hWnd; public string szWindowName; public string szClassName; } public struct WINDOWINFO { public int cbSize; public RECT rcWindow; public RECT rcClient; public int dwStyle; public int dwExStyle; public int dwWindowStatus; public uint cxWindowBorders; public uint cyWindowBorders; public int atomWindowType; public int wCreatorVersion; public IntPtr hWnd; public string szWindowName; public string szClassName; public string szExePath; } #endregion #region SYSTEM_INFO [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } #endregion #region MEMORYSTATUS //struct 收集内存情况 [StructLayout(LayoutKind.Sequential)] public struct MEMORYSTATUS { public uint dwLength; public uint dwMemoryLoad; public uint dwTotalPhys; public uint dwAvailPhys; public uint dwTotalPageFile; public uint dwAvailPageFile; public uint dwTotalVirtual; public uint dwAvailVirtual; } #endregion #region TokPriv1Luid [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } #endregion #region DEVMODE [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct DEVMODE { //[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] //public string dmDeviceName; //public short dmSpecVersion; //public short dmDriverVersion; //public short dmSize; //public short dmDriverExtra; //public int dmFields; //public int dmPositionX; //public int dmPositionY; //public DMDO dmDisplayOrientation; //public int dmDisplayFixedOutput; //public short dmColor; //public short dmDuplex; //public short dmYResolution; //public short dmTTOption; //public short dmCollate; //[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] //public string dmFormName; //public short dmLogPixels; //public int dmBitsPerPel; //public int dmPelsWidth; //public int dmPelsHeight; //public int dmDisplayFlags; //public int dmDisplayFrequency; //public int dmICMMethod; //public int dmICMIntent; //public int dmMediaType; //public int dmDitherType; //public int dmReserved1; //public int dmReserved2; //public int dmPanningWidth; //public int dmPanningHeight; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmDeviceName; public int dmSpecVersion; public int dmDriverVersion; public int dmSize; public int dmDriverExtra; public int dmFields; public short dmOrientation; public short dmPaperSize; public short dmPaperLength; public short dmPaperWidth; public short dmScale; public short dmCopies; public short dmDefaultSource; public short dmPrintQuality; public Point dmPosition; public int dmDisplayOrientation; public int dmDisplayFixedOutput; public short dmColor; public short dmDuplex; public short dmYResolution; public short dmTTOption; public short dmCollate; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmFormName; public int dmLogPixels; public int dmBitsPerPel; public int dmPelsWidth; public int dmPelsHeight; public int dmDisplayFlags; public int dmNup; public int dmDisplayFrequency; public int dmICMMethod; public int dmICMIntent; public int dmMediaType; public int dmDitherType; public int dmReserved1; public int dmReserved2; public int dmPanningWidth; public int dmPanningHeight; } #endregion #region COMBOBOXINFO public struct COMBOBOXINFO { public int cbSize; public RECT rcItem; public RECT rcButton; public int stateButton; public IntPtr hwndCombo; public IntPtr hwndItem; public IntPtr hwndList; } #endregion #region SHELLEXECUTEINFO [StructLayout(LayoutKind.Sequential)] public struct SHELLEXECUTEINFO //用于ShellExecuteEx { public int cbSize; public int fMask; public IntPtr hwnd; public string lpVerb; public string lpFile; public string lpParameters; public string lpDirectory; public int nShow; public IntPtr hInstApp; public IntPtr lpIDList; public string lpClass; public IntPtr hkeyClass; public int dwHotKey; public IntPtr hIcon; public IntPtr hProcess; } #endregion #region WIN32_FIND_DATA [Serializable, StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto), BestFitMapping(false)] public struct WIN32_FIND_DATA { public int dwFileAttributes; public int ftCreationTime_dwLowDateTime; public int ftCreationTime_dwHighDateTime; public int ftLastAccessTime_dwLowDateTime; public int ftLastAccessTime_dwHighDateTime; public int ftLastWriteTime_dwLowDateTime; public int ftLastWriteTime_dwHighDateTime; public int nFileSizeHigh; public int nFileSizeLow; public int dwReserved0; public int dwReserved1; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] public string cFileName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)] public string cAlternateFileName; } #endregion #region OSVERSIONINFO [StructLayout(LayoutKind.Sequential)] public struct OSVERSIONINFO { public int dwOSVersionInfoSize; public int dwMajorVersion; public int dwMinorVersion; public int dwBuildNumber; public int dwPlatformId; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szCSDVersion; } #endregion #region OSVERSIONINFOEX [StructLayout(LayoutKind.Sequential)] public struct OSVERSIONINFOEX { public int dwOSVersionInfoSize; public int dwMajorVersion; public int dwMinorVersion; public int dwBuildNumber; public int dwPlatformId; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szCSDVersion; public Int16 wServicePackMajor; public Int16 wServicePackMinor; public Int16 wSuiteMask; public Byte wProductType; public Byte wReserved; } #endregion #region OPENFILENAME [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public class OPENFILENAME { public int structSize = 0; public IntPtr dlgOwner = IntPtr.Zero; public IntPtr instance = IntPtr.Zero; public String filter = null; public String customFilter = null; public int maxCustFilter = 0; public int filterIndex = 0; public String file = null; public int maxFile = 0; public String fileTitle = null; public int maxFileTitle = 0; public String initialDir = null; public String title = null; public int flags = 0; public short fileOffset = 0; public short fileExtension = 0; public String defExt = null; public IntPtr custData = IntPtr.Zero; public IntPtr hook = IntPtr.Zero; public String templateName = null; public IntPtr reservedPtr = IntPtr.Zero; public int reservedInt = 0; public int flagsEx = 0; } #endregion #region STARTUPINFO [StructLayout(LayoutKind.Sequential)] public struct STARTUPINFO { public int cb; public string lpReserved; public string lpDesktop; public string lpTitle; public int dwX; public int dwY; public int dwXSize; public int dwYSize; public int dwXCountChars; public int dwYCountChars; public int dwFillAttribute; public int dwFlags; public int wShowWindow; public int cbReserved2; public byte lpReserved2; public IntPtr hStdInput; public IntPtr htdOutput; public IntPtr hStdError; } #endregion #region _FILETIME public struct _FILETIME { public int dwLowDateTime; public int dwHighDateTime; } #endregion #region INTERNET_CACHE_ENTRY_INFO [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct INTERNET_CACHE_ENTRY_INFO { public int dwStructSize; public IntPtr lpszSourceUrlName; public IntPtr lpszLocalFileName; public int CacheEntryType; public int dwUseCount; public int dwHitRate; public int dwSizeLow; public int dwSizeHigh; public _FILETIME LastModifiedTime; public _FILETIME ExpireTime; public _FILETIME LastAccessTime; public _FILETIME LastSyncTime; public IntPtr lpHeaderInfo; public int dwHeaderInfoSize; public IntPtr lpszFileExtension; public int dwExemptDelta; } #endregion #region PROCESS_INFORMATION [StructLayout(LayoutKind.Sequential)] public struct PROCESS_INFORMATION { public IntPtr hProcess; public IntPtr hThread; public uint dwProcessId; public uint dwThreadId; } #endregion #region SECURITY_ATTRIBUTES [StructLayout(LayoutKind.Sequential)] public class SECURITY_ATTRIBUTES { public int nLength; public string lpSecurityDescriptor; public bool bInheritHandle; } #endregion #region MODULEENTRY32 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct MODULEENTRY32 { public int dwSize; public int th32ModuleID; public int th32ProcessID; public int GlblcntUsage; public int ProccntUsage; public byte modBaseAddr; public int modBaseSize; public IntPtr hModule; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string szModule; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] public string szExePath; } #endregion #region SCROLLINFO public struct SCROLLINFO { public uint cbSize; public uint fMask; public int nMin; public int nMax; public uint nPage; public int nPos; public int nTrackPos; } #endregion #region DISPLAY_DEVICE public struct DISPLAY_DEVICE { public int cb; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string DeviceName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceString; public int StateFlags; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceID; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceKey; } #endregion #region SHFILEINFO public struct SHFILEINFO { public IntPtr hIcon; public int iIcon; public int dwAttributes; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] public string szDisplayName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szTypeName; } #endregion #region FLASHWINFO public struct FLASHWINFO { public uint cbSize; public IntPtr hwnd; public int dwFlags; public uint uCount; public int dwTimeout; } #endregion #region FINDREPLACE public delegate UInt32 FRHookProc(System.IntPtr hdlg, UInt32 uiMsg, UInt32 wParam, UInt32 lParam); [StructLayout(LayoutKind.Sequential)] public struct FINDREPLACE { public int lStructSize; public IntPtr hwndOwner; public IntPtr hInstance; public int Flags; public string lpstrFindWhat; public string lpstrReplaceWith; public UInt16 wFindWhatLen; public UInt16 wReplaceWithLen; public UInt32 lCustData; public FRHookProc lpfnHook; public string lpTemplateName; } #endregion #region CHOOSECOLOR //public delegate UInt32 CCHOOKPROC(IntPtr hdlg, UInt32 uiMsg, UInt32 wParam, UInt32 lParam); //[StructLayout(LayoutKind.Sequential)] //public struct CHOOSECOLOR //{ // public int lStructSize; // public IntPtr hwndOwner; // public IntPtr hInstance; // public int rgbResult; // public int lpCustColors; // public int Flags; // public CCHOOKPROC lCustData; // public long lpfnHook; // public string lpTemplateName; //} public delegate IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public class CHOOSECOLOR { public int lStructSize = Marshal.SizeOf(typeof(CHOOSECOLOR)); public IntPtr hwndOwner; public IntPtr hInstance; public int rgbResult; public IntPtr lpCustColors; public int Flags; public IntPtr lCustData = IntPtr.Zero; public WndProc lpfnHook; public string lpTemplateName; } #endregion #region CHOOSEFONT //public delegate UInt32 CFHOOKPROC(); //[StructLayout(LayoutKind.Sequential)] //public struct CHOOSEFONT //{ // public int lStructSize; // public IntPtr hwndOwner; // public IntPtr hDC; // public LOGFONT lpLogFont; // public int iPointSize; // public long Flags; // public int rgbColors; // public UInt32 lCustData; // public CFHOOKPROC lpfnHook; // public string lpTemplateName; // public IntPtr hInstance; // public string lpszStyle; // public int nFontType; // public int nSizeMin; // public int nSizeMax; //} [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public class CHOOSEFONT { public int lStructSize = Marshal.SizeOf(typeof(CHOOSEFONT)); public IntPtr hwndOwner; public IntPtr hDC; public IntPtr lpLogFont; public int iPointSize; public int Flags; public int rgbColors; public IntPtr lCustData = IntPtr.Zero; public WndProc lpfnHook; public string lpTemplateName; public IntPtr hInstance; public string lpszStyle; public short nFontType; public short ___MISSING_ALIGNMENT__; public int nSizeMin; public int nSizeMax; } #endregion #region LOGFONT //public struct LOGFONT //{ // public long lfHeight; // public long lfWidth; // public long lfEscapement; // public long lfOrientation; // public long lfWeight; // public byte lfItalic; // public byte lfUnderline; // public byte lfStrikeOut; // public byte lfCharSet; // public byte lfOutPrecision; // public byte lfClipPrecision; // public byte lfQuality; // public byte lfPitchAndFamily; // [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] // public string lfFaceName; //} [StructLayout(LayoutKind.Sequential)] public class LOGFONT { public const int LF_FACESIZE = 32; public int lfHeight; public int lfWidth; public int lfEscapement; public int lfOrientation; public int lfWeight; public byte lfItalic; public byte lfUnderline; public byte lfStrikeOut; public byte lfCharSet; public byte lfOutPrecision; public byte lfClipPrecision; public byte lfQuality; public byte lfPitchAndFamily; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = LF_FACESIZE)] public string lfFaceName; } #endregion #region MENUINFO public struct MENUINFO { public int cbSize; public int fMask; public int dwStyle; public int cyMax; public IntPtr hbrBack; public int dwContextHelpID; public int dwMenuData; } #endregion #region MENUITEMINFO [StructLayout(LayoutKind.Sequential)] public struct MENUITEMINFO { public uint cbSize; public uint fMask; public uint fType; public uint fState; public int wID; public int hSubMenu; public int hbmpChecked; public int hbmpUnchecked; public int dwItemData; public IntPtr dwTypeData; public uint cch; } //[StructLayout(LayoutKind.Sequential)] //public struct MENUITEMINFO //{ // public uint cbSize; // public uint fMask; // public uint fType; // public uint fState; // public int wID; // public int /**//*HMENU*/ hSubMenu; // public int /**//*HBITMAP*/ hbmpChecked; // public int /**//*HBITMAP*/ hbmpUnchecked; // public int /**//*ULONG_PTR*/ dwItemData; // public IntPtr dwTypeData; // public uint cch; // public int /**//*HBITMAP*/ hbmpItem; //} #endregion #region MSG public struct MSG { public IntPtr hwnd; public uint message; public int wParam; public int lParam; public int time; public Point pt; } #endregion #region WNDCLASS public delegate string CallBack(IntPtr hwnd, int lParam); public delegate int WNDPROC(IntPtr hwnd, uint uMsg, int wParam, int lParam); [StructLayout(LayoutKind.Sequential)] public struct WNDCLASS { public uint style; public WNDPROC lpfnWndProc; public int cbClsExtra; public int cbWndExtra; public IntPtr hInstance; public IntPtr hIcon; public IntPtr hCursor; public IntPtr hbrBackground; public string lpszMenuName; public string lpszClassName; } #endregion #region NOTIFYICONDATA [StructLayout(LayoutKind.Sequential)] public struct NOTIFYICONDATA { public int cbSize; public IntPtr hWnd; public uint uID; public uint uFlags; public uint uCallbackMessage; public IntPtr hIcon; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szTip; public int dwState; public int dwStateMask; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string szInfo; public uint uTimeout; public uint uVersion; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string szInfoTitle; public int dwInfoFlags; } #endregion #region BY_HANDLE_FILE_INFORMATION public struct BY_HANDLE_FILE_INFORMATION { public int dwFileAttributes; public _FILETIME ftCreationTime; public _FILETIME ftLastAccessTime; public _FILETIME ftLastWriteTime; public int dwVolumeSerialNumber; public int nFileSizeHigh; public int nFileSizeLow; public int nNumberOfLinks; public int nFileIndexHigh; public int nFileIndexLow; public int dwOID; } #endregion #region ProcessInfo public struct ProcessInfo { public IntPtr hwnd; public string ClassName; public string WindowText; public string path; public int processsize; public Point location; public Size wsize; public Size csize; public DateTime starttime; public string runtime; public IntPtr phwnd; public int id; public string text; public int dwStyle; public int dwExStyle; public uint cxWindowBorders; public uint cyWindowBorders; } #endregion #region MODULEINFO public struct MODULEINFO { public IntPtr lpBaseOfDll; public int SizeOfImage; public IntPtr EntryPoint; } #endregion #region ServiceEnumInfo public struct ServiceEnumInfo { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)] public string szPrefix; public string szDllName; public IntPtr hServiceHandle; public int dwServiceState; } #endregion #region TIME_ZONE_INFORMATION [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TIME_ZONE_INFORMATION { public long Bias; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string StandardName; public SYSTEMTIME StandardDate; public long StandardBias; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string DaylightName; SYSTEMTIME DaylightDate; public long DaylightBias; } #endregion #region ICONINFO public struct ICONINFO { public bool fIcon; public int xHotspot; public int yHotspot; public IntPtr hbmMask; public IntPtr hbmColor; } #endregion #region MONITORINFO public struct MONITORINFO { public int cbSize; public RECT rcMonitor; public RECT rcWork; public int dwFlags; } #endregion #region MONITORINFOEX public struct MONITORINFOEX { public int cbSize; public RECT rcMonitor; public RECT rcWork; public int dwFlags; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string szDevice; } #endregion #region INPUT [StructLayout(LayoutKind.Explicit)] public struct INPUT { [System.Runtime.InteropServices.FieldOffset(0)] public int type; [System.Runtime.InteropServices.FieldOffset(4)] public MOUSEINPUT mi; [System.Runtime.InteropServices.FieldOffset(4)] public KEYBDINPUT ki; [System.Runtime.InteropServices.FieldOffset(4)] public HARDWAREINPUT hi; } #endregion #region KEYBDINPUT [StructLayout(LayoutKind.Sequential)] public struct KEYBDINPUT { public short wVk; public short wScan; public int dwFlags; public int time; public IntPtr dwExtraInfo; } #endregion #region MOUSEINPUT [StructLayout(LayoutKind.Sequential)] public struct MOUSEINPUT { public int dx; public int dy; public int mouseData; public int dwFlags; public int time; public IntPtr dwExtraInfo; } #endregion #region HARDWAREINPUT [StructLayout(LayoutKind.Sequential)] public struct HARDWAREINPUT { public int uMsg; public short wParamL; public short wParamH; } #endregion #region DRAWTEXTPARAMS public struct DRAWTEXTPARAMS { public uint cbSize; public int iTabLength; public int iLeftMargin; public int iRightMargin; public uint uiLengthDrawn; } #endregion #endregion #region API_const /// <summary> /// Windows API 常数 /// </summary> public class CommonConst { #region GENERIC public const uint GENERIC_READ = 0x80000000; public const uint GENERIC_WRITE = 0x40000000; #endregion #region CREATEOPEN public const int CREATE_NEW = 1; public const int CREATE_ALWAYS = 2; public const int OPEN_EXISTING = 3; public const int OPEN_ALWAYS = 4; #endregion #region FILE_SHARE public const int FILE_SHARE_READ = 0x1; public const int FILE_SHARE_WRITE = 0x2; public const uint FILE_FLAG_NO_BUFFERING = 0x20000000; public const uint FILE_FLAG_WRITE_THROUGH = 0x80000000; #endregion #region FO public const int FO_MOVE = 0x01; public const int FO_COPY = 0x02; public const int FO_DELETE = 0x03; public const int FO_RENAME = 0x04; #endregion #region FOF public const int FOF_MULTIDESTFILES = 0x01; public const int FOF_CONFIRMMOUSE = 0x02; public const int FOF_SILENT = 0x04; public const int FOF_RENAMEONCOLLISION = 0x08; public const int FOF_NOCONFIRMATION = 0x10; public const int FOF_WANTMAPPINGHANDLE = 0x20; public const int FOF_ALLOWUNDO = 0x40; public const int FOF_FILESONLY = 0x80; public const int FOF_SIMPLEPROGRESS = 0x0100; public const int FOF_NOCONFIRMMKDIR = 0x0200; #endregion #region WS public const int WS_OVERLAPPED = 0x0; public const uint WS_POPUP = 0x80000000; public const int WS_CHILD = 0x40000000; public const int WS_MINIMIZE = 0x20000000; public const int WS_VISIBLE = 0x10000000; public const int WS_DISABLED = 0x8000000; public const int WS_CLIPSIBLINGS = 0x4000000; public const int WS_CLIPCHILDREN = 0x2000000; public const int WS_MAXIMIZE = 0x1000000; public const int WS_CAPTION = 0xC00000; public const int WS_BORDER = 0x800000; public const int WS_DLGFRAME = 0x400000; public const int WS_VSCROLL = 0x200000; public const int WS_HSCROLL = 0x100000; public const int WS_SYSMENU = 0x80000; public const int WS_THICKFRAME = 0x40000; public const int WS_GROUP = 0x20000; public const int WS_TABSTOP = 0x10000; public const int WS_MINIMIZEBOX = 0x20000; public const int WS_MAXIMIZEBOX = 0x10000; public const int WS_TILED = WS_OVERLAPPED; public const int WS_ICONIC = WS_MINIMIZE; public const int WS_SIZEBOX = WS_THICKFRAME; public const int WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX); public const int WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW; public const uint WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU); public const int WS_CHILDWINDOW = (WS_CHILD); public const int WS_EX_WINDOWEDGE = 0x100; //窗口具有凸起的3D边框 public const int WS_EX_CLIENTEDGE = 0x200; //窗口具有阴影边界 public const int WS_EX_TOOLWINDOW = 0x80; //小标题工具窗口 public const int WS_EX_TOPMOST = 0x8; //窗口总在顶层 public const int WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE); //WS_EX-CLIENTEDGE和WS_EX_WINDOWEDGE的组合 public const int WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST); //WS_EX_WINDOWEDGE和WS_EX_TOOLWINDOW和WS_EX_TOPMOST的组合 public const int WS_EX_DLGMODALFRAME = 0x1; //带双边的窗口 public const int WS_EX_NOPARENTNOTIFY = 0x4; //窗口在创建和销毁时不向父窗口发送WM_PARENTNOTIFY消息 public const int WS_EX_TRANSPARENT = 0x20; //窗口透眀 public const int WS_EX_MDICHILD = 0x40; //MDI子窗口 public const int WS_EX_CONTEXTHELP = 0x400; //标题栏包含问号联机帮助按钮 public const int WS_EX_RIGHT = 0x1000; //窗口具有右对齐属性 public const int WS_EX_RTLREADING = 0x2000; //窗口文本自右向左显示 public const int WS_EX_LEFTSCROLLBAR = 0x4000; //标题栏在客户区的左边 public const int WS_EX_CONTROLPARENT = 0x10000; //允许用户使用Tab键在窗口的子窗口间搜索 public const int WS_EX_STATICEDGE = 0x20000; //为不接受用户输入的项创建一个三维边界风格 public const int WS_EX_APPWINDOW = 0x40000; //在任务栏上显示顶层窗口的标题按钮 public const int WS_EX_LAYERED = 0x80000; //窗口具有透眀属性(Win2000)以上 public const int WS_EX_NOINHERITLAYOUT = 0x100000; //窗口布局不传递给子窗口(Win2000)以上 public const int WS_EX_LAYOUTRTL = 0x400000; //水平起点在右边的窗口 public const int WS_EX_NOACTIVATE = 0x8000000; //窗口不会变成前台窗口(Win2000)以上 public const int WS_EX_LEFT = 0x0; //窗口具有左对齐属性 public const int WS_EX_LTRREADING = 0x0; //窗口文本自左向右显示 public const int WS_EX_RIGHTSCROLLBAR = 0x0; //垂直滚动条在窗口的右边界 public const int WS_EX_ACCEPTFILES = 0x10; //接受文件拖曳 public const int WS_EX_COMPOSITED = 0x2000000; //窗体所有子窗口使用双缓冲从低到高绘制(XP) #endregion #region WM public const int WM_NULL = 0x0000; public const int WM_CREATE = 0x0001; public const int WM_DESTROY = 0x0002; public const int WM_MOVE = 0x0003; public const int WM_SIZE = 0x0005; public const int WM_ACTIVATE = 0x0006; public const int WM_SETFOCUS = 0x0007; public const int WM_KILLFOCUS = 0x0008; public const int WM_ENABLE = 0x000A; public const int WM_SETREDRAW = 0x000B; public const int WM_SETTEXT = 0x000C; public const int WM_GETTEXT = 0x000D; public const int WM_GETTEXTLENGTH = 0x000E; public const int WM_PAINT = 0x000F; public const int WM_CLOSE = 0x0010; public const int WM_QUERYENDSESSION = 0x0011; public const int WM_QUIT = 0x0012; public const int WM_QUERYOPEN = 0x0013; public const int WM_ERASEBKGND = 0x0014; public const int WM_SYSCOLORCHANGE = 0x0015; public const int WM_ENDSESSION = 0x0016; public const int WM_SYSTEMERROR = 0x0017; public const int WM_SHOWWINDOW = 0x0018; public const int WM_CTLCOLOR = 0x0019; public const int WM_WININICHANGE = 0x001A; public const int WM_SETTINGCHANGE = WM_WININICHANGE; public const int WM_DEVMODECHANGE = 0x001B; public const int WM_ACTIVATEAPP = 0x001C; public const int WM_FONTCHANGE = 0x001D; public const int WM_TIMECHANGE = 0x001E; public const int WM_CANCELMODE = 0x001F; public const int WM_SETCURSOR = 0x0020; public const int WM_MOUSEACTIVATE = 0x0021; public const int WM_CHILDACTIVATE = 0x0022; public const int WM_QUEUESYNC = 0x0023; public const int WM_GETMINMAXINFO = 0x0024; public const int WM_PAINTICON = 0x0026; public const int WM_ICONERASEBKGND = 0x0027; public const int WM_NEXTDLGCTL = 0x0028; public const int WM_SPOOLERSTATUS = 0x002A; public const int WM_DRAWITEM = 0x002B; public const int WM_MEASUREITEM = 0x002C; public const int WM_DELETEITEM = 0x002D; public const int WM_VKEYTOITEM = 0x002E; public const int WM_CHARTOITEM = 0x002F; public const int WM_SETFONT = 0x0030; public const int WM_GETFONT = 0x0031; public const int WM_SETHOTKEY = 0x0032; public const int WM_GETHOTKEY = 0x0033; public const int WM_QUERYDRAGICON = 0x0037; public const int WM_COMPAREITEM = 0x0039; public const int WM_GETOBJECT = 0x003D; public const int WM_COMPACTING = 0x0041; public const int WM_COMMNOTIFY = 0x0044; public const int WM_WINDOWPOSCHANGING = 0x0046; public const int WM_WINDOWPOSCHANGED = 0x0047; public const int WM_POWER = 0x0048; public const int WM_COPYDATA = 0x004A; public const int WM_CANCELJOURNAL = 0x004B; public const int WM_NOTIFY = 0x004E; public const int WM_INPUTLANGCHANGEREQUEST = 0x0050; public const int WM_INPUTLANGCHANGE = 0x0051; public const int WM_TCARD = 0x0052; public const int WM_HELP = 0x0053; public const int WM_USERCHANGED = 0x0054; public const int WM_NOTIFYFORMAT = 0x0055; public const int WM_CONTEXTMENU = 0x007B; public const int WM_STYLECHANGING = 0x007C; public const int WM_STYLECHANGED = 0x007D; public const int WM_DISPLAYCHANGE = 0x007E; public const int WM_GETICON = 0x007F; public const int WM_SETICON = 0x0080; public const int WM_NCCREATE = 0x0081; public const int WM_NCDESTROY = 0x0082; public const int WM_NCCALCSIZE = 0x0083; public const int WM_NCHITTEST = 0x0084; public const int WM_NCPAINT = 0x0085; public const int WM_NCACTIVATE = 0x0086; public const int WM_GETDLGCODE = 0x0087; public const int WM_NCMOUSEMOVE = 0x00A0; public const int WM_NCLBUTTONDOWN = 0x00A1; public const int WM_NCLBUTTONUP = 0x00A2; public const int WM_NCLBUTTONDBLCLK = 0x00A3; public const int WM_NCRBUTTONDOWN = 0x00A4; public const int WM_NCRBUTTONUP = 0x00A5; public const int WM_NCRBUTTONDBLCLK = 0x00A6; public const int WM_NCMBUTTONDOWN = 0x00A7; public const int WM_NCMBUTTONUP = 0x00A8; public const int WM_NCMBUTTONDBLCLK = 0x00A9; public const int WM_NCXBUTTONDOWN = 0x00AB; public const int WM_NCXBUTTONUP = 0x00AC; public const int WM_NCXBUTTONDBLCLK = 0x00AD; public const int WM_INPUT = 0x00FF; public const int WM_KEYFIRST = 0x0100; public const int WM_KEYDOWN = 0x0100; public const int WM_KEYUP = 0x0101; public const int WM_CHAR = 0x0102; public const int WM_DEADCHAR = 0x0103; public const int WM_SYSKEYDOWN = 0x0104; public const int WM_SYSKEYUP = 0x0105; public const int WM_SYSCHAR = 0x0106; public const int WM_SYSDEADCHAR = 0x0107; public const int WM_UNICHAR = 0x0109; public const int WM_KEYLAST = 0x0109; public const int WM_INITDIALOG = 0x0110; public const int WM_COMMAND = 0x0111; public const int WM_SYSCOMMAND = 0x0112; public const int WM_TIMER = 0x0113; public const int WM_HSCROLL = 0x0114; public const int WM_VSCROLL = 0x0115; public const int WM_INITMENU = 0x0116; public const int WM_INITMENUPOPUP = 0x0117; public const int WM_MENUSELECT = 0x011F; public const int WM_MENUCHAR = 0x0120; public const int WM_ENTERIDLE = 0x0121; public const int WM_MENURBUTTONUP = 0x0122; public const int WM_MENUDRAG = 0x0123; public const int WM_MENUGETOBJECT = 0x0124; public const int WM_UNINITMENUPOPUP = 0x0125; public const int WM_MENUCOMMAND = 0x0126; public const int WM_CHANGEUISTATE = 0x0127; public const int WM_UPDATEUISTATE = 0x0128; public const int WM_QUERYUISTATE = 0x0129; public const int WM_CTLCOLORMSGBOX = 0x0132; public const int WM_CTLCOLOREDIT = 0x0133; public const int WM_CTLCOLORLISTBOX = 0x0134; public const int WM_CTLCOLORBTN = 0x0135; public const int WM_CTLCOLORDLG = 0x0136; public const int WM_CTLCOLORSCROLLBAR = 0x0137; public const int WM_CTLCOLORSTATIC = 0x0138; public const int WM_MOUSEFIRST = 0x0200; public const int WM_MOUSEMOVE = 0x0200; public const int WM_LBUTTONDOWN = 0x0201; public const int WM_LBUTTONUP = 0x0202; public const int WM_LBUTTONDBLCLK = 0x0203; public const int WM_RBUTTONDOWN = 0x0204; public const int WM_RBUTTONUP = 0x0205; public const int WM_RBUTTONDBLCLK = 0x0206; public const int WM_MBUTTONDOWN = 0x0207; public const int WM_MBUTTONUP = 0x0208; public const int WM_MBUTTONDBLCLK = 0x0209; public const int WM_MOUSEWHEEL = 0x020A; public const int WM_MOUSELAST = 0x020A; public const int WM_PARENTNOTIFY = 0x0210; public const int WM_ENTERMENULOOP = 0x0211; public const int WM_EXITMENULOOP = 0x0212; public const int WM_NEXTMENU = 0x0213; public const int WM_SIZING = 532; public const int WM_CAPTURECHANGED = 533; public const int WM_MOVING = 534; public const int WM_POWERBROADCAST = 536; public const int WM_DEVICECHANGE = 537; public const int WM_IME_STARTCOMPOSITION = 0x010D; public const int WM_IME_ENDCOMPOSITION = 0x010E; public const int WM_IME_COMPOSITION = 0x010F; public const int WM_IME_KEYLAST = 0x010F; public const int WM_IME_SETCONTEXT = 0x0281; public const int WM_IME_NOTIFY = 0x0282; public const int WM_IME_CONTROL = 0x0283; public const int WM_IME_COMPOSITIONFULL = 0x0284; public const int WM_IME_SELECT = 0x0285; public const int WM_IME_CHAR = 0x0286; public const int WM_IME_REQUEST = 0x0288; public const int WM_IME_KEYDOWN = 0x0290; public const int WM_IME_KEYUP = 0x0291; public const int WM_MDICREATE = 0x0220; public const int WM_MDIDESTROY = 0x0221; public const int WM_MDIACTIVATE = 0x0222; public const int WM_MDIRESTORE = 0x0223; public const int WM_MDINEXT = 0x0224; public const int WM_MDIMAXIMIZE = 0x0225; public const int WM_MDITILE = 0x0226; public const int WM_MDICASCADE = 0x0227; public const int WM_MDIICONARRANGE = 0x0228; public const int WM_MDIGETACTIVE = 0x0229; public const int WM_MDISETMENU = 0x0230; public const int WM_ENTERSIZEMOVE = 0x0231; public const int WM_EXITSIZEMOVE = 0x0232; public const int WM_DROPFILES = 0x0233; public const int WM_MDIREFRESHMENU = 0x0234; public const int WM_MOUSEHOVER = 0x02A1; public const int WM_MOUSELEAVE = 0x02A3; public const int WM_NCMOUSEHOVER = 0x02A0; public const int WM_NCMOUSELEAVE = 0x02A2; public const int WM_WTSSESSION_CHANGE = 0x02B1; public const int WM_TABLET_FIRST = 0x02C0; public const int WM_TABLET_LAST = 0x02DF; public const int WM_CUT = 0x0300; public const int WM_COPY = 0x0301; public const int WM_PASTE = 0x0302; public const int WM_CLEAR = 0x0303; public const int WM_UNDO = 0x0304; public const int WM_RENDERFORMAT = 0x0305; public const int WM_RENDERALLFORMATS = 0x0306; public const int WM_DESTROYCLIPBOARD = 0x0307; public const int WM_DRAWCLIPBOARD = 0x0308; public const int WM_PAINTCLIPBOARD = 0x0309; public const int WM_VSCROLLCLIPBOARD = 0x030A; public const int WM_SIZECLIPBOARD = 0x030B; public const int WM_ASKCBFORMATNAME = 0x030C; public const int WM_CHANGECBCHAIN = 0x030D; public const int WM_HSCROLLCLIPBOARD = 0x030E; public const int WM_QUERYNEWPALETTE = 0x030F; public const int WM_PALETTEISCHANGING = 0x0310; public const int WM_PALETTECHANGED = 0x0311; public const int WM_HOTKEY = 0x0312; public const int WM_PRINT = 791; public const int WM_PRINTCLIENT = 792; public const int WM_APPCOMMAND = 0x0319; public const int WM_THEMECHANGED = 0x031A; public const int WM_HANDHELDFIRST = 856; public const int WM_HANDHELDLAST = 863; public const int WM_PENWINFIRST = 0x0380; public const int WM_PENWINLAST = 0x038F; public const int WM_COALESCE_FIRST = 0x0390; public const int WM_COALESCE_LAST = 0x039F; public const int WM_DDE_FIRST = 0x03E0; public const int WM_DWMCOMPOSITIONCHANGED = 0x031E; public const int WM_DWMNCRENDERINGCHANGED = 0x031F; public const int WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320; public const int WM_DWMWINDOWMAXIMIZEDCHANGE = 0x0321; public const int WM_APP = 0x8000; public const int WM_USER = 0x0400; #endregion #region SW public const int SW_HIDE = 0; public const int SW_SHOWNORMAL = 1; public const int SW_NORMAL = 1; public const int SW_SHOWMINIMIZED = 2; public const int SW_SHOWMAXIMIZED = 3; public const int SW_MAXIMIZE = 3; public const int SW_SHOWNOACTIVATE = 4; public const int SW_SHOW = 5; public const int SW_MINIMIZE = 6; public const int SW_SHOWMINNOACTIVE = 7; public const int SW_SHOWNA = 8; public const int SW_RESTORE = 9; public const int SW_SHOWDEFAULT = 10; public const int SW_FORCEMINIMIZE = 11; public const int SW_MAX = 11; #endregion #region OF public const int OF_READ = 0x00000000; public const int OF_WRITE = 0x00000001; public const int OF_READWRITE = 0x00000002; public const int OF_SHARE_COMPAT = 0x00000000; public const int OF_SHARE_EXCLUSIVE = 0x00000010; public const int OF_SHARE_DENY_WRITE = 0x00000020; public const int OF_SHARE_DENY_READ = 0x00000030; public const int OF_SHARE_DENY_NONE = 0x00000040; public const int OF_PARSE = 0x00000100; public const int OF_DELETE = 0x00000200; public const int OF_VERIFY = 0x00000400; public const int OF_CANCEL = 0x00000800; public const int OF_CREATE = 0x00001000; public const int OF_PROMPT = 0x00002000; public const int OF_EXIST = 0x00004000; public const int OF_REOPEN = 0x00008000; #endregion #region SWP public const int SWP_DRAWFRAME = 0x0020; //围绕窗口画一个框 public const int SWP_HIDEWINDOW = 0x0080; //隐藏窗口 public const int SWP_NOACTIVATE = 0x0010; //不激活窗口 public const int SWP_NOMOVE = 0x0002; //保持当前位置(x和y设定将被忽略) public const int SWP_NOREDRAW = 0x0008; //窗口不自动重画 public const int SWP_NOSIZE = 0x0001;//保持当前大小(cx和cy会被忽略) public const int SWP_NOZORDER = 0x0004;//保持窗口在列表的当前位置(hWndInsertAfter将被忽略) public const int SWP_SHOWWINDOW = 0x0040; //显示窗口 public const int SWP_FRAMECHANGED = 0x0020; //强迫一条WM_NCCALCSIZE消息进入窗口,即使窗口的大小没有改变 #endregion #region HWND public const int HWND_TOP = 0; public const int HWND_BOTTOM = 1; public const int HWND_TOPMOST = -1; public const int HWND_NOTTOPMOST = -2; #endregion #region PROCESSOR //处理器类型 public const int PROCESSOR_INTEL_386 = 386; public const int PROCESSOR_INTEL_486 = 486; public const int PROCESSOR_INTEL_PENTIUM = 586; public const int PROCESSOR_MIPS_R4000 = 4000; public const int PROCESSOR_ALPHA_21064 = 21064; #endregion #region EWX public const int SE_PRIVILEGE_ENABLED = 0x00000002; public const int TOKEN_QUERY = 0x00000008; public const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege"; public const int EWX_LOGOFF = 0x00000000; public const int EWX_SHUTDOWN = 0x00000001; public const int EWX_REBOOT = 0x00000002; public const int EWX_FORCE = 0x00000004; public const int EWX_POWEROFF = 0x00000008; public const int EWX_FORCEIFHUNG = 0x00000010; #endregion #region VK public const int VK_LBUTTON = 0x1; public const int VK_RBUTTON = 0x2; public const int VK_CANCEL = 0x3; public const int VK_MBUTTON = 0x4; public const int VK_BACK = 0x8; public const int VK_TAB = 0x9; public const int VK_CLEAR = 0xC; public const int VK_RETURN = 0xD; public const int VK_SHIFT = 0x10; public const int VK_CONTROL = 0x11; public const int VK_MENU = 0x12; public const int VK_PAUSE = 0x13; public const int VK_CAPITAL = 0x14; public const int VK_ESCAPE = 0x1B; public const int VK_SPACE = 0x20; public const int VK_PRIOR = 0x21; public const int VK_NEXT = 0x22; public const int VK_END = 0x23; public const int VK_HOME = 0x24; public const int VK_LEFT = 0x25; public const int VK_UP = 0x26; public const int VK_RIGHT = 0x27; public const int VK_DOWN = 0x28; public const int VK_SELECT = 0x29; public const int VK_PRINT = 0x2A; public const int VK_EXECUTE = 0x2B; public const int VK_SNAPSHOT = 0x2C; public const int VK_INSERT = 0x2D; public const int VK_DELETE = 0x2E; public const int VK_HELP = 0x2F; public const int VK_NUMPAD0 = 0x60; public const int VK_NUMPAD1 = 0x61; public const int VK_NUMPAD2 = 0x62; public const int VK_NUMPAD3 = 0x63; public const int VK_NUMPAD4 = 0x64; public const int VK_NUMPAD5 = 0x65; public const int VK_NUMPAD6 = 0x66; public const int VK_NUMPAD7 = 0x67; public const int VK_NUMPAD8 = 0x68; public const int VK_NUMPAD9 = 0x69; public const int VK_MULTIPLY = 0x6A; public const int VK_ADD = 0x6B; public const int VK_SEPARATOR = 0x6C; public const int VK_SUBTRACT = 0x6D; public const int VK_DECIMAL = 0x6E; public const int VK_DIVIDE = 0x6F; public const int VK_F1 = 0x70; public const int VK_F2 = 0x71; public const int VK_F3 = 0x72; public const int VK_F4 = 0x73; public const int VK_F5 = 0x74; public const int VK_F6 = 0x75; public const int VK_F7 = 0x76; public const int VK_F8 = 0x77; public const int VK_F9 = 0x78; public const int VK_F10 = 0x79; public const int VK_F11 = 0x7A; public const int VK_F12 = 0x7B; public const int VK_F13 = 0x7C; public const int VK_F14 = 0x7D; public const int VK_F15 = 0x7E; public const int VK_F16 = 0x7F; public const int VK_F17 = 0x80; public const int VK_F18 = 0x81; public const int VK_F19 = 0x82; public const int VK_F20 = 0x83; public const int VK_F21 = 0x84; public const int VK_F22 = 0x85; public const int VK_F23 = 0x86; public const int VK_F24 = 0x87; public const int VK_NUMLOCK = 0x90; public const int VK_SCROLL = 0x91; public const int VK_LSHIFT = 0xA0; public const int VK_RSHIFT = 0xA1; public const int VK_LCONTROL = 0xA2; public const int VK_RCONTROL = 0xA3; public const int VK_LMENU = 0xA4; public const int VK_RMENU = 0xA5; public const int VK_ATTN = 0xF6; public const int VK_CRSEL = 0xF7; public const int VK_EXSEL = 0xF8; public const int VK_EREOF = 0xF9; public const int VK_PLAY = 0xFA; public const int VK_ZOOM = 0xFB; public const int VK_NONAME = 0xFC; public const int VK_PA1 = 0xFD; public const int VK_OEM_CLEAR = 0xFE; #endregion #region SC public const int SC_SIZE = 0xF000; public const int SC_MOVE = 0xF010; public const int SC_MINIMIZE = 0xF020; public const int SC_MAXIMIZE = 0xF030; public const int SC_NEXTWINDOW = 0xF040; public const int SC_PREVWINDOW = 0xF050; public const int SC_CLOSE = 0xF060; public const int SC_VSCROLL = 0xF070; public const int SC_HSCROLL = 0xF080; public const int SC_MOUSEMENU = 0xF090; public const int SC_KEYMENU = 0xF100; public const int SC_ARRANGE = 0xF110; public const int SC_RESTORE = 0xF120; public const int SC_TASKLIST = 0xF130; public const int SC_SCREENSAVE = 0xF140; public const int SC_HOTKEY = 0xF150; public const int SC_DEFAULT = 0xF160; public const int SC_MONITORPOWER = 0xF170; public const int SC_CONTEXTHELP = 0xF180; public const int SC_SEPARATOR = 0xF00F; public const int SC_ICON = SC_MINIMIZE; public const int SC_ZOOM = SC_MAXIMIZE; #endregion #region MF public const int MF_INSERT = 0x00000000; public const int MF_CHANGE = 0x00000080; public const int MF_APPEND = 0x00000100; public const int MF_DELETE = 0x00000200; public const int MF_REMOVE = 0x00001000; public const int MF_BYCOMMAND = 0x00000000; public const int MF_BYPOSITION = 0x00000400; public const int MF_SEPARATOR = 0x00000800; public const int MF_ENABLED = 0x00000000; public const int MF_GRAYED = 0x00000001; public const int MF_DISABLED = 0x00000002; public const int MF_UNCHECKED = 0x00000000; public const int MF_CHECKED = 0x00000008; public const int MF_USECHECKBITMAPS = 0x00000200; public const int MF_STRING = 0x00000000; public const int MF_BITMAP = 0x00000004; public const int MF_OWNERDRAW = 0x00000100; public const int MF_POPUP = 0x00000010; public const int MF_MENUBARBREAK = 0x00000020; public const int MF_MENUBREAK = 0x00000040; public const int MF_UNHILITE = 0x00000000; public const int MF_HILITE = 0x00000080; public const int MF_DEFAULT = 0x00001000; public const int MF_SYSMENU = 0x00002000; public const int MF_HELP = 0x00004000; public const int MF_RIGHTJUSTIFY = 0x00004000; public const int MF_MOUSESELECT = 0x00008000; public const int MF_END = 0x00000080; #endregion #region SE public const int SE_ERR_ACCESSDENIED = 5; //拒绝访问 public const int SE_ERR_ASSOCINCOMPLETE = 27; // 文件关联信息不完整 public const int SE_ERR_DDEBUSY = 30; // DDE繁忙 public const int SE_ERR_DDEFAIL = 29; // DDE操作失败 public const int SE_ERR_DDETIMEOUT = 28; // DDE操作超时 public const int SE_ERR_DLLNOTFOUND = 32; // 没有找到动态链接库 public const int SE_ERR_FNF = 2; // 没有找到文件 public const int SE_ERR_NOASSOC = 31; // 没有找到文件关联 public const int SE_ERR_OOM = 8; // 内存不足 public const int SE_ERR_PNF = 3; // 没有找到路径 public const int SE_ERR_SHARE = 26; // 不能操作一个以打开的文件 #endregion [Flags] enumMouseEventFlag :uint { Move = 0x001, LeftDown = 0x0002, LeftUP = 0x0004, RightDown = 0x0008, RightUp = 0x0010, MiddleDown = 0x0020, MiddleUP = 0x0040, Absolut = 0x8000, xDown = 0x0080, xUp = 0x0100, wheel = 0x0800, virtualDesk = 0x4000 }
评论