how to make a xml shared in different Forms?
-
Hi,everyone! I want that a XML file be open when Form1 had been load, before my application was killed, this XML should stays open and different Form could call it . I tryed use "Public Shared xml as new XmlDocument () ", but in Form2's control event, when I input "xml.", it didn't show the list of properties and methods. It seemed like "Public Shared" disabled? What should I do? Please give me some suggestions! Thank you very much!
-
Hi,everyone! I want that a XML file be open when Form1 had been load, before my application was killed, this XML should stays open and different Form could call it . I tryed use "Public Shared xml as new XmlDocument () ", but in Form2's control event, when I input "xml.", it didn't show the list of properties and methods. It seemed like "Public Shared" disabled? What should I do? Please give me some suggestions! Thank you very much!
Because
xml
is not specific toForm1
, it really should be put in a code module and not in the form. You will not need to use theShared
keywork in that case. I expect that will fix your problem. -
Because
xml
is not specific toForm1
, it really should be put in a code module and not in the form. You will not need to use theShared
keywork in that case. I expect that will fix your problem.