Ok so I'm quite new to programming, making steady progress as I go along! Pretty much teaching myself from text books etc. I'm currently working on a fairly basic project to create an MDI text editor. I'll try my best to explain everything needed but no doubt I'll leave out some key information so bear with me!
Form1 is the MDI container, with subsequent forms named "Note" as the child forms. To quote from my code if it helps, "Note.MdiParent = Me". All that is contained in the Note form is a RichTextBox.
The thing causing me difficulties just now is that I'm trying to use a boolean variable called FileSaved to check if the text in the RichTextBox has changed since the document was last saved (ie in Sub RichTextBox1_TextChanged(blah blah), FileSaved = False). This would then enable me to warn the user that the document hasn't been saved if they try to close it.
However, I can't use this FileSaved variable freely between the Form1 class and Note class. There's a glaringly obvious solution here but it's eluding me. As I've said in the title, I'm sure I'm making it seem more difficult than it is!
Cheers for any help guys. I appreciate your patience
Form1 is the MDI container, with subsequent forms named "Note" as the child forms. To quote from my code if it helps, "Note.MdiParent = Me". All that is contained in the Note form is a RichTextBox.
The thing causing me difficulties just now is that I'm trying to use a boolean variable called FileSaved to check if the text in the RichTextBox has changed since the document was last saved (ie in Sub RichTextBox1_TextChanged(blah blah), FileSaved = False). This would then enable me to warn the user that the document hasn't been saved if they try to close it.
However, I can't use this FileSaved variable freely between the Form1 class and Note class. There's a glaringly obvious solution here but it's eluding me. As I've said in the title, I'm sure I'm making it seem more difficult than it is!
Cheers for any help guys. I appreciate your patience