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


C# Forms.Msg类代码示例

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


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

示例1: SendMessage

		public static IntPtr SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
		{
			if (_onMSNET)
				return SendMessage_Win32 (hwnd, (int) message, wParam, lParam);
			else
				return (IntPtr) InvokeMethod ("SendMessage", new object[] { hwnd, message, wParam, lParam });
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:Native.cs

示例2: SendMessage

		public static IntPtr SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
		{

			Assembly assembly = Assembly.Load (Consts.AssemblySystem_Windows_Forms);
			Type refType = assembly.GetType ("System.Windows.Forms.Message&");
			object[] args = new object[] { Message.Create (hwnd, (int)message, wParam, lParam) };
			InvokeMethod ("SendMessage", args, new Type[] { refType });
			return ((Message)args[0]).Result;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:Native.cs

示例3: ProcessMenuKey

		void ProcessMenuKey (Msg msg_type)
		{
			if (TopMenu.MenuItems.Count == 0)
				return;

			MainMenu main_menu = TopMenu as MainMenu;

			switch (msg_type) {
			case Msg.WM_SYSKEYDOWN:
				switch (keynav_state) {
				case KeyNavState.Idle:
					keynav_state = KeyNavState.Startup;
					hotkey_active = true;
					GrabControl.ActiveTracker = this;
					CurrentMenu = TopMenu;
					main_menu.Draw ();
					break;
				case KeyNavState.Startup:
					break;
				default:
					Deactivate ();
					main_menu.Draw ();
					break;
				}
				break;

			case Msg.WM_SYSKEYUP:
				switch (keynav_state) {
				case KeyNavState.Idle:
				case KeyNavState.Navigating:
					break;
				case KeyNavState.Startup:
					keynav_state = KeyNavState.NoPopups;
					SelectItem (TopMenu, TopMenu.MenuItems [0], false);
					break;
				default:
					Deactivate ();
					main_menu.Draw ();
					break;
				}
				break;
			}
		}
开发者ID:stabbylambda,项目名称:mono,代码行数:43,代码来源:MenuAPI.cs

示例4: PeekMessage

		private static extern bool PeekMessage( out Msg msg, IntPtr handle, uint msgFilterMin, uint msgFilterMax,
		                                        uint removeMsg );
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:2,代码来源:Win32MessageHandling.cs

示例5: PostMessage

		// FIXME - I think this should just enqueue directly
		public bool PostMessage (IntPtr handle, Msg message, IntPtr wparam, IntPtr lparam)
		{
			XEvent xevent = new XEvent ();
			X11Hwnd hwnd = (X11Hwnd)Hwnd.ObjectFromHandle(handle);

			xevent.type = XEventName.ClientMessage;
			xevent.ClientMessageEvent.display = display;

			if (hwnd != null) {
				xevent.ClientMessageEvent.window = hwnd.WholeWindow;
			} else {
				xevent.ClientMessageEvent.window = IntPtr.Zero;
			}

			xevent.ClientMessageEvent.message_type = Atoms.PostAtom;
			xevent.ClientMessageEvent.format = 32;
			xevent.ClientMessageEvent.ptr1 = handle;
			xevent.ClientMessageEvent.ptr2 = (IntPtr) message;
			xevent.ClientMessageEvent.ptr3 = wparam;
			xevent.ClientMessageEvent.ptr4 = lparam;

			hwnd.Queue.Enqueue (xevent);

			return true;
		}
开发者ID:BrzVlad,项目名称:mono,代码行数:26,代码来源:X11Display.cs

示例6: Win32DefWindowProc

		private extern static IntPtr Win32DefWindowProc(IntPtr hWnd, Msg Msg, IntPtr wParam, IntPtr lParam);
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:1,代码来源:XplatUIWin32.cs

示例7: Win32PostMessage

		private extern static bool Win32PostMessage(IntPtr hwnd, Msg msg, IntPtr wParam, IntPtr lParam);
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:1,代码来源:XplatUIWin32.cs

示例8: SendParentNotify

		// For WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN, WM_XBUTTONDOWN
		//     WM_CREATE and WM_DESTROY causes
		void SendParentNotify(IntPtr child, Msg cause, int x, int y)
		{	
			Hwnd hwnd;
			
			if (child == IntPtr.Zero) {
				return;
			}
			
			hwnd = Hwnd.GetObjectFromWindow (child);
			
			if (hwnd == null) {
				return;
			}
			
			if (hwnd.Handle == IntPtr.Zero) {
				return;
			}
			
			if (ExStyleSet ((int) hwnd.initial_ex_style, WindowExStyles.WS_EX_NOPARENTNOTIFY)) {
				return;
			}
			
			if (hwnd.Parent == null) {
				return;
			}
			
			if (hwnd.Parent.Handle == IntPtr.Zero) {
				return;
			}

			if (cause == Msg.WM_CREATE || cause == Msg.WM_DESTROY) {
				SendMessage(hwnd.Parent.Handle, Msg.WM_PARENTNOTIFY, Control.MakeParam((int)cause, 0), child);
			} else {
				SendMessage(hwnd.Parent.Handle, Msg.WM_PARENTNOTIFY, Control.MakeParam((int)cause, 0), Control.MakeParam(x, y));
			}
			
			SendParentNotify (hwnd.Parent.Handle, cause, x, y);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:40,代码来源:XplatUIX11.cs

示例9: SendMessage

		internal override IntPtr SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) {
			return Win32SendMessage(hwnd, message, wParam, lParam);
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:3,代码来源:XplatUIWin32.cs

示例10: WaitForHwndMessage

		void WaitForHwndMessage (Hwnd hwnd, Msg message) {
			WaitForHwndMessage (hwnd, message, false);

		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:XplatUIX11.cs

示例11: PostMessage

		internal override bool PostMessage (IntPtr handle, Msg message, IntPtr wparam, IntPtr lparam)
		{
			XEvent xevent = new XEvent ();
			Hwnd hwnd = Hwnd.ObjectFromHandle(handle);

			xevent.type = XEventName.ClientMessage;
			xevent.ClientMessageEvent.display = DisplayHandle;

			if (hwnd != null) {
				xevent.ClientMessageEvent.window = hwnd.whole_window;
			} else {
				xevent.ClientMessageEvent.window = IntPtr.Zero;
			}

			xevent.ClientMessageEvent.message_type = (IntPtr) PostAtom;
			xevent.ClientMessageEvent.format = 32;
			xevent.ClientMessageEvent.ptr1 = handle;
			xevent.ClientMessageEvent.ptr2 = (IntPtr) message;
			xevent.ClientMessageEvent.ptr3 = wparam;
			xevent.ClientMessageEvent.ptr4 = lparam;

			if (hwnd != null)
				hwnd.Queue.EnqueueLocked (xevent);
			else
				ThreadQueue(Thread.CurrentThread).EnqueueLocked (xevent);

			return true;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:28,代码来源:XplatUIX11.cs

示例12: PostMessage

		internal override bool PostMessage (IntPtr handle, Msg message, IntPtr wparam, IntPtr lparam)
		{
			return display.PostMessage (handle, message, wparam, lparam);
		}
开发者ID:stabbylambda,项目名称:mono,代码行数:4,代码来源:XplatUIX11-new.cs

示例13: SendMessage

		// XXX this is likely shareable amongst other backends
		internal override IntPtr SendMessage (IntPtr handle, Msg message, IntPtr wParam, IntPtr lParam)
		{
			return display.SendMessage (handle, message, wParam, lParam);
		}
开发者ID:stabbylambda,项目名称:mono,代码行数:5,代码来源:XplatUIX11-new.cs

示例14: SendMessage

		internal static IntPtr SendMessage (IntPtr handle, Msg message, IntPtr wParam, IntPtr lParam)
		{
			DriverDebug ("SendMessage ({0}, {1}, {2:X}, {3:X}): Called", Window (handle), message, wParam.ToInt32 (), lParam.ToInt32 ());
			return driver.SendMessage (handle, message, wParam, lParam);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:5,代码来源:XplatUI.cs

示例15: PostMessage

		internal static bool PostMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam)
		{
			DriverDebug ("PostMessage ({0}, {1}, {2:X}, {3:X}): Called", Window (hwnd), message, wParam.ToInt32 (), lParam.ToInt32 ());
			return driver.PostMessage (hwnd, message, wParam, lParam);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:5,代码来源:XplatUI.cs


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