當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。