What do you mean by the sentence "I can use the serialport inside 'Form1.h' but not from elsewhere."? I assume you are using managed C++ (aka C++/CLI) to build your program but you actually want to use pure C++. Take a look at some of
these articles[
^] for some suggestions as to how you may do it.