Custom dialog box in C#?

后端 未结 5 1952
执笔经年
执笔经年 2021-02-20 17:19

I have a button that when clicked, a dialog box opens up with various controls on it such as radio buttons and text boxes. If OK then the values in that dialog box is passed ba

5条回答
  •  庸人自扰
    2021-02-20 17:45

    You can do this. Create a new form. From your main form you can call custom form using:

    CustomForm customForm = new CustomForm();
    customForm.ShowDialog(); 
    

    Make sure that you add relevant button to custom form and set their DialogResult property to OK, Cancel or anything else.

提交回复
热议问题