winforms - How to format textboxes in MDI child form in c# -
I am developing an application in which many MDIs are forms of children and forms of a parent.
I want to add a format button to the menu toolstrip of the parent form, so the following changes should be applied when clicking on the Format button:
Focus on the active form textbox.
Please how do you have to do this?
private zeros btnFormat_Click (object sender, EventArgs e) {If (ActiveMdiChild! = Null) {Form TestForm = ActiveMDiBed; Control cont = testform.ActiveControl; If (textbox is textbox) {// ((Textbox) composite text = "Nasir Khan"; FontDialog fontdialog 1 = New FontDialog (); // Show DialogResult Results = fontDialog1.ShowDialog (); // Watch if OK If it was pressed (result == DialogResult.OK) {// font go.fonts font = fontDialog1.Font; ((textbox) cont.) Font = font;}}}}
< / Div>