System.Windows.Forms.Cursor.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
		public override string ToString()
		{
			if (name != null) {
				return "[Cursor:" + name + "]";
			}

			throw new FormatException("Cannot convert custom cursors to string.");
		}

Usage Example

Example #1
0
        public bool resetPassword()
        {
            System.Windows.Forms.Cursor currentCursor = System.Windows.Forms.Cursor.Current;
            Mouse.OverrideCursor = System.Windows.Input.Cursors.Arrow;

            _errors = "";
            RegistrationWindow win = new RegistrationWindow();

            win.ResizeMode = System.Windows.ResizeMode.NoResize;
            bool?res = win.ShowDialog();

            if (res == true)
            {
                KeyStorePassword = win.tbPassword.Password;
            }

            if (currentCursor.ToString().Contains("Wait"))
            {
                Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
            }

            return(res == true);
        }