在子窗口的代码中标明MSComm控件的归属窗体即可,例如:父窗口名称为Form1,则在子窗口中直接写代码即可:A=&H41form1.Mscomm.outbuffercount=0form1.Mscomm.output=A