1.新建项目添加WatermarkTextBox类: using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Drawing; using System.ComponentModel; namespace TextBoxWatermark { [ToolboxBitmap(typeof(TextBox))] public class Wa…