当前位置: 首页>>代码示例>>C#>>正文


C# System.Win32类代码示例

本文整理汇总了C#中System.Win32的典型用法代码示例。如果您正苦于以下问题:C# Win32类的具体用法?C# Win32怎么用?C# Win32使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Win32类属于System命名空间,在下文中一共展示了Win32类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SearchResult

        public SearchResult(Win32.UsnEntry usnEntry, UsnJournal journal)
        {
            UsnEntry = usnEntry;

            _journal = journal;
            _driveName = journal.RootDirectory.FullName;
        }
开发者ID:beaugunderson,项目名称:scrutiny,代码行数:7,代码来源:SearchResult.cs

示例2: DeviceDetectorEventArgs

		public DeviceDetectorEventArgs(Win32.DBT changeType, Win32.DBCH_DEVICETYPE? deviceType, object deviceInfo)
		{
			Cancel = false;
			_ChangeType = changeType;
			_DeviceInfo = deviceInfo;
			_DeviceType = deviceType;
		}
开发者ID:vcompestine,项目名称:x360ce,代码行数:7,代码来源:DeviceDetectorEventArgs.cs

示例3: DataBase

 public DataBase( Win32.USER32.TBBUTTON tbButton, string buttonText, IntPtr windowHandle, int imageIndex )
 {
     _TBButton = tbButton;
     _ButtonText = buttonText;
     _WindowHandle = windowHandle;
     _ImageIndex = imageIndex;
 }
开发者ID:zaeem,项目名称:FlexCollab,代码行数:7,代码来源:Data.cs

示例4: AddBubbleEvent

		public void AddBubbleEvent(Func<BubbleEventArgs, bool> handleEvent, Win32.WM message)
		{
			messages.Add((int)message, new BubbleEvent
			{
				Message = message,
				HandleEvent = handleEvent
			});
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:8,代码来源:BubbleEventFilter.cs

示例5: WndProcHook

        private int WndProcHook(int nCode, IntPtr wParam, ref Win32.Message lParam)
        {
            if (nCode >= 0)
            {
                Win32.TranslateMessage(ref lParam); // You may want to remove this line, if you find your not quite getting the right messages through. This is here so that WM_CHAR is correctly called when a key is pressed.
                WndProc(ref lParam);
            }

            return Win32.CallNextHookEx(hHook, nCode, wParam, ref lParam);
        }
开发者ID:slicedpan,项目名称:SpaceInvaders,代码行数:10,代码来源:WindowsHook.cs

示例6: DeviceInfo

 public DeviceInfo(string deviceId, string manufacturer, string description, Guid classGuid, string classDescription, Win32.DeviceNodeStatus status, uint vid, uint pid, uint rev)
 {
     _DeviceId = deviceId ?? "";
     _Description = description ?? "";
     _Manufacturer = manufacturer ?? "";
     _ClassGuid = classGuid;
     _ClassDescription = classDescription ?? "";
     _Status = status;
     _VendorId = vid;
     _ProductId = pid;
     _Revision = rev;
 }
开发者ID:XxRaPiDK3LLERxX,项目名称:nucleuscoop,代码行数:12,代码来源:DeviceInfo.cs

示例7: HasTitleBarButtonChangedCallback

        static void HasTitleBarButtonChangedCallback(DependencyObject obj,
            DependencyPropertyChangedEventArgs e, Win32.WindowStyles button)
        {
            var window = obj as Window;
            if (window == null)
                return;

            if (!window.IsLoaded)
                window.Loaded += s_loadedHandler;
            else
                InternalSetStyleFlag(window, button, (bool)e.NewValue);
        }
开发者ID:CarlosX,项目名称:Kamilla,代码行数:12,代码来源:WindowBehavior.cs

示例8: DebugProcess

        public DebugProcess(Debuggee dbg, Win32.CREATE_PROCESS_DEBUG_INFO info, uint id, uint threadId)
        {
            this.Debuggee = dbg;
            Handle = info.hProcess;
            Id = id == 0 ? API.GetProcessId(Handle) : id;

            var moduleFile = APIIntermediate.GetModulePath(Handle, info.lpBaseOfImage, info.hFile);

            // Deduce main module
            MainModule = new DebugProcessModule(info.lpBaseOfImage, moduleFile, ExecutableMetaInfo.ExtractFrom(moduleFile));
            RegModule(MainModule);

            // Create main thread
            MainThread = new DebugThread(this,
                info.hThread,
                threadId == 0 ? API.GetThreadId(info.hThread) : threadId,
                info.lpStartAddress,
                info.lpThreadLocalBase);
            RegThread(MainThread);
        }
开发者ID:aBothe,项目名称:DDebugger,代码行数:20,代码来源:DebugProcess.cs

示例9: SetWindowsHookEx

 public static extern IntPtr SetWindowsHookEx(Win32.HookType code, HookProc func, IntPtr hInstance, int threadID);
开发者ID:JackWangCUMT,项目名称:rdlc.report.engine,代码行数:1,代码来源:NativeMethods.cs

示例10: GetDeviceNodeStatus

 static bool GetDeviceNodeStatus(UInt32 dnDevInst, IntPtr hMachine, out Win32.DeviceNodeStatus status)
 {
     // c:\Program Files\Microsoft SDKs\Windows\v7.1\Include\cfg.h
     uint Status;
     uint ProblemNumber;
     bool success = false;
     // http://msdn.microsoft.com/en-gb/library/windows/hardware/ff538517%28v=vs.85%29.aspx
     var cr = CM_Get_DevNode_Status_Ex(out Status, out ProblemNumber, dnDevInst, 0, hMachine);
     status = 0;
     if (cr == CR.CR_SUCCESS)
     {
         status = (Win32.DeviceNodeStatus)Status;
         success = true;
     }
     return success;
 }
开发者ID:huntintiger1004,项目名称:nucleuscoop,代码行数:16,代码来源:DeviceDetector.cs

示例11: GetClipBox

 public static extern int GetClipBox(IntPtr hDC, ref Win32.RECT rectBox); 
开发者ID:tropology,项目名称:ceptr,代码行数:1,代码来源:Gdi32.cs

示例12: SetFlag

 /// <summary>
 /// Helper function to set or clear a bit in the flags field.
 /// </summary>
 /// <param name="flag">The Flag bit to set or clear.</param>
 /// <param name="value">True to set, false to clear the bit in the flags field.</param>
 private void SetFlag( Win32.NativeMethods.TASKDIALOG_FLAGS flag, bool value )
 {
     if ( value )
     {
         this.flags |= flag;
     }
     else
     {
         this.flags &= ~flag;
     }
 }
开发者ID:pvginkel,项目名称:SystemEx,代码行数:16,代码来源:TaskDialog.cs

示例13: DirectionResize

        public void DirectionResize(Win32.ResizeDirection direction)
        {
            int _direction = -1;

            switch (direction)
            {
                case Win32.ResizeDirection.Left:
                    _direction = Win32.HTLEFT;
                    break;
                case Win32.ResizeDirection.TopLeft:
                    _direction = Win32.HTTOPLEFT;
                    break;
                case Win32.ResizeDirection.Top:
                    _direction = Win32.HTTOP;
                    break;
                case Win32.ResizeDirection.TopRight:
                    _direction = Win32.HTTOPRIGHT;
                    break;
                case Win32.ResizeDirection.Right:
                    _direction = Win32.HTRIGHT;
                    break;
                case Win32.ResizeDirection.BottomRight:
                    _direction = Win32.HTBOTTOMRIGHT;
                    break;
                case Win32.ResizeDirection.Bottom:
                    _direction = Win32.HTBOTTOM;
                    break;
                case Win32.ResizeDirection.BottomLeft:
                    _direction = Win32.HTBOTTOMLEFT;
                    break;
            }

            if (_direction != -1)
            {
                Win32.ReleaseCapture();
                Win32.SendMessage(this.Handle, Win32.WM_NCLBUTTONDOWN, _direction, 0);
            }
        }
开发者ID:autarchprinceps,项目名称:Chiave,代码行数:38,代码来源:MainWindow.cs

示例14: OnWM_MOUSEMOVE

        internal void OnWM_MOUSEMOVE(Win32.POINT screenPos)
        {
            // Convert the mouse position to screen coordinates
            User32.ScreenToClient(this.Handle, ref screenPos);

            OnProcessMouseMove(screenPos.x, screenPos.y);
        }
开发者ID:uvbs,项目名称:Holodeck,代码行数:7,代码来源:MenuControl.cs

示例15: hsServer_ClientStyleChanged

 void hsServer_ClientStyleChanged(Win32.WindowShowStyle style)
 {
     MethodInvoker action = delegate
    {
        gbClient.Enabled = true;
        if (style == Win32.WindowShowStyle.Hide)
            cbShowHideClient.Checked = false;
        else if (style == Win32.WindowShowStyle.Show)
            cbShowHideClient.Checked = true;
    };
     this.Invoke(action);
 }
开发者ID:EgyFalseX,项目名称:Winform,代码行数:12,代码来源:MainFrm.cs


注:本文中的System.Win32类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。