當前位置: 首頁>>代碼示例>>C#>>正文


C# Form.ResetCursor方法代碼示例

本文整理匯總了C#中System.Windows.Forms.Form.ResetCursor方法的典型用法代碼示例。如果您正苦於以下問題:C# Form.ResetCursor方法的具體用法?C# Form.ResetCursor怎麽用?C# Form.ResetCursor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.Form的用法示例。


在下文中一共展示了Form.ResetCursor方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetWindowState

		internal void SetWindowState (Form form, FormWindowState old_window_state, FormWindowState new_window_state, bool is_activating_child)
		{
			bool mdiclient_layout;

			MdiWindowManager wm = (MdiWindowManager) form.window_manager;

			if (!is_activating_child && new_window_state == FormWindowState.Maximized && !wm.IsActive) {
				ActivateChild (form);
				return;
			}
				
			if (old_window_state == FormWindowState.Normal)
				wm.NormalBounds = form.Bounds;

			if (SetWindowStates (wm))
				return;

			if (old_window_state == new_window_state)
				return;

			mdiclient_layout = old_window_state == FormWindowState.Maximized || new_window_state == FormWindowState.Maximized;

			switch (new_window_state) {
			case FormWindowState.Minimized:
				ArrangeIconicWindows (false);
				break;
			case FormWindowState.Maximized:
				form.Bounds = wm.MaximizedBounds;
				break;
			case FormWindowState.Normal:
				form.Bounds = wm.NormalBounds;
				break;
			}

			wm.UpdateWindowDecorations (new_window_state);

			form.ResetCursor ();

			if (mdiclient_layout)
				Parent.PerformLayout ();

			XplatUI.RequestNCRecalc (Parent.Handle);
			XplatUI.RequestNCRecalc (form.Handle);
			if (!setting_windowstates)
				SizeScrollBars ();
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:46,代碼來源:MdiClient.cs

示例2: TestPublicMethods


//.........這裏部分代碼省略.........
			
			//c.Invoke (new InvokeDelegate (InvokeMethod));
			//Assert.IsFalse (c.IsHandleCreated, "A16");
			c.PerformLayout ();
			Assert.IsFalse (c.IsHandleCreated, "A17");
			
			c.PointToClient (new Point (100, 100));
			Assert.IsTrue (c.IsHandleCreated, "A18");
			c.Dispose ();
			c = new Form ();
			
			c.PointToScreen (new Point (100, 100));
			Assert.IsTrue (c.IsHandleCreated, "A19");
			c.Dispose ();
			
			c = new Form ();
			
			//c.PreProcessControlMessage   ???
			//c.PreProcessMessage          ???
			c.RectangleToClient (new Rectangle (0, 0, 100, 100));
			Assert.IsTrue (c.IsHandleCreated, "A20");
			c.Dispose ();
			c = new Form ();
			c.RectangleToScreen (new Rectangle (0, 0, 100, 100));
			Assert.IsTrue (c.IsHandleCreated, "A21");
			c.Dispose ();
			c = new Form ();
			c.Refresh ();
			Assert.IsFalse (c.IsHandleCreated, "A22");
			c.ResetBackColor ();
			Assert.IsFalse (c.IsHandleCreated, "A23");
			c.ResetBindings ();
			Assert.IsFalse (c.IsHandleCreated, "A24");
			c.ResetCursor ();
			Assert.IsFalse (c.IsHandleCreated, "A25");
			c.ResetFont ();
			Assert.IsFalse (c.IsHandleCreated, "A26");
			c.ResetForeColor ();
			Assert.IsFalse (c.IsHandleCreated, "A27");
			c.ResetImeMode ();
			Assert.IsFalse (c.IsHandleCreated, "A28");
			c.ResetRightToLeft ();
			Assert.IsFalse (c.IsHandleCreated, "A29");
			c.ResetText ();
			Assert.IsFalse (c.IsHandleCreated, "A30");
			c.SuspendLayout ();
			Assert.IsFalse (c.IsHandleCreated, "A31");
			c.ResumeLayout ();
			Assert.IsFalse (c.IsHandleCreated, "A32");
			c.Scale (new SizeF (1.5f, 1.5f));
			Assert.IsFalse (c.IsHandleCreated, "A33");
			c.Select ();
			Assert.IsTrue (c.IsHandleCreated, "A34");
			c.Dispose ();
			
			c = new Form ();
			
			c.SelectNextControl (new Control (), true, true, true, true);
			Assert.IsFalse (c.IsHandleCreated, "A35");
			c.SetBounds (0, 0, 100, 100);
			Assert.IsFalse (c.IsHandleCreated, "A36");
			c.Update ();
			Assert.IsFalse (c.IsHandleCreated, "A37");
			
			// Form
			
開發者ID:BrzVlad,項目名稱:mono,代碼行數:66,代碼來源:FormHandleTest.cs


注:本文中的System.Windows.Forms.Form.ResetCursor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。