I’m relatively new to C#, as my background is actually java.
I’m creating a little Windows Forms app similar to notepad, only I’m using a MDIContainer-parent as the base of my app and various children-windows as the ‘pages’.
What I’m trying to do is to set the font of only the selected child form from my FontDialog (activated from a MenuBar on the parent window). I have managed to get it to set the font of all the child forms together, but obviously that’s not ideal.
Thanks, help is appreciated. 🙂
Note: I have not included any code, as I don’t have anything relevant
You should use
Form.ActiveMdiChildto get the currently active child form.On the other hand, a better approach might be to create child-form-specific menu items on the child form itself, and then merge these items into the main menu strip. This way, whenever you activate a child form, it will be responsible for handling its own commands.