Help with saving from a child form?

Raymond van Roest 1 Reputation point
2020-10-17T00:18:56.817+00:00

Hi Guys and Girls I am struggling with something that I think is supossed to be a simple and standard function of any application!

My App is being writen in C# using Visual Studio Community 2019.

it is at this point a 2 form aplication.

A main form (isMdiParent = true)
With 1 each menu and tool strips both with the standard items inserted.

A child form with a textbox with multi line = true.
(the child form is being set up so multiple instances can be opend for copy and paste functions and file comparing)

I am struggling with a simple save function.
(I have been able to do the save function in my single form without to much problem, but I am finding it dificult with my Mdi version of the application.)

I need to save the information in the textbox of the child form. doing so via the standard save items of the Parent form.

I will need help with the save, save as and a save all functions as well.

I will also need help with this so that when I close the application the files are saved when I close the application via the File/Exit menu item or closing the app via the standard close buttun at the top of the form.

I have the Using System IO inserted at the top of the code as normal, so I can use the Streamreader and StreamWriter functions.

How and what do I need to put in my code to make this work.

Please show the code for the Parent form and the Child form.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,884 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.