Global variables / persistant variable between forms and classes

DataClass data;
data.strComPort = "COM1";

How do I have that variable keep it's value after the current form is closed? When I close the form, the value is wiped out, even though strComPort is a public member of a different class (DataClass).

So far, I've been writing to the registry to store variables, but that's not an acceptable solution for this project. I've tried what I can make sense of on the google results to no avail.
What language?
You could 'send the data' to another form within the 'formClosing' event handler?
Topic archived. No new replies allowed.