打开文件失败的容错提示语句 try if OpenDialog1.Execute then begin MyList.Clear; MyList.LoadFromFile(OpenDialog1.FileName); end; except on E:EReadError do ShowMessage('打开文件失败'); end; //防止程序假死 Application.ProcessMessages; //删除记录时提示的语句 try with TADOQuery.Create(nil)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace _04TextBox { public partia
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