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 CowainHmi { public partial class FrmAddRow : Form { public int RowCount { get; set; } public FrmAddRow() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { RowCount = (int)this.rowCountInput.Value; this.DialogResult = DialogResult.OK; } } }