objForm = createobject("form1") objForm.show read event define class form1 as form top = 0 left = 0 height = 250 width = 375 add object cmdQuit as commandbutton with ; top = 168, left = 156, height = 27, width = 84, caption = "Exit", name = "cmdQuit" add object txtgetdata as textbox with ; value = "", height = 23, left = 132, top = 60, width = 132, name = "txtGetData" procedure init *-- *-- I execute the program that reads com port. I use CreateProcess function API *-- Within "readcomm.exe" I use the Keyboard command to send the characters *-- reading of com port. *-- local obj obj = createobject("backgrnd.backgrnd") obj.backgrnd("readcomm.exe") *-- The program "readcomm.exe" is open and reads com port constantly in background. endproc procedure cmdQuit.click clear events clear dlls thisform.release endproc enddefine