System.Windows.Forms.TextBoxBase.Copy C# (CSharp) Method

Copy() public method

public Copy ( ) : void
return void
		public void Copy ()
		{
			m_helper.TextView.Copy(this);
		}

Usage Example

Example #1
0
        /// <summary>
        /// Does application-wide copy
        /// </summary>
        public static void Copy()
        {
            Control activeControl = Application.ActiveControl;

            if (activeControl == null)
            {
                return;
            }

            System.Windows.Forms.TextBoxBase active = activeControl as System.Windows.Forms.TextBoxBase;
            if (active != null)
            {
                active.Copy();
                return;
            }

            System.Windows.Forms.WebBrowser webbrowser = activeControl as System.Windows.Forms.WebBrowser;
            if (webbrowser != null)
            {
                WebBrowserHelper.ExecCopy(webbrowser);
                ///TODO: don't work in unix
                return;
            }

            MethodInfo method = activeControl.GetType().GetMethod("Copy");

            if (method != null)
            {
                FunctionWithoutReturn getMethod = (FunctionWithoutReturn)Delegate.CreateDelegate
                                                      (typeof(FunctionWithoutReturn), activeControl, method);

                getMethod();
            }
        }