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 PlaylistManager { public partial class frmProgress : Form { public bool cancelled; public frmProgress() { InitializeComponent(); } private void frmProgress_Load(object sender, EventArgs e) { } private void btnCancel_Click(object sender, EventArgs e) { cancelled = true; Application.DoEvents(); } } }