当前位置: 首页>>代码示例>>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;未经允许,请勿转载。