private void btn_OnlineUpload_Click(object sender, EventArgs e) { FileUploadPage f_up = new FileUploadPage(this); // Hide the main form this.Hide(); // Show the Device Page as a dialog f_up.ShowDialog(); }