Hello
I have, some time ago, written a Proram in PB-DOS to transfer programs from a NC-controlled machine and save them to disk.
I am working on transfering this program now to PBWin, i made some simple projects already in PBWin, but only as hobby and with limited time and knowledge.
The serial port communications i have finished already and they work well.
In my DOS-Program i have the communications routine running in a DO - LOOP loop with checking INKEY$ to Escape to be able to terminate the routine. All the timeouts of the COM-port are disabled so the program is waiting fas long as it receives data from the machine and thats why it is neccesary to be able to terminate the routine.
In my Win-Program i call my communication SUB from the CALLBACK of a dialog where i enter the data for the programs database and give these data as parameter to my SUB where the program from machine is received and stored to disk and the data is written to the database.
My problem is now:
How do i implement the termination routine in PBWin?
A simple MODAL-Dialog will block the loop waiting for transmission from machine, so i guess i would need something MODELESS, but i am not sure how to realise it.
I thought of having a new dialog with a Cancel-Button and a TextBox to have the status, like "Waiting for transmission", "Receiving" and "Transmission finished".
I think i just need a starting point how to realise it, some things in windows programming are not very clear to me.
Thanks for any sugestions and ideas.
Dieter
'edited because of typo
I have, some time ago, written a Proram in PB-DOS to transfer programs from a NC-controlled machine and save them to disk.
I am working on transfering this program now to PBWin, i made some simple projects already in PBWin, but only as hobby and with limited time and knowledge.
The serial port communications i have finished already and they work well.
In my DOS-Program i have the communications routine running in a DO - LOOP loop with checking INKEY$ to Escape to be able to terminate the routine. All the timeouts of the COM-port are disabled so the program is waiting fas long as it receives data from the machine and thats why it is neccesary to be able to terminate the routine.
In my Win-Program i call my communication SUB from the CALLBACK of a dialog where i enter the data for the programs database and give these data as parameter to my SUB where the program from machine is received and stored to disk and the data is written to the database.
My problem is now:
How do i implement the termination routine in PBWin?
A simple MODAL-Dialog will block the loop waiting for transmission from machine, so i guess i would need something MODELESS, but i am not sure how to realise it.
I thought of having a new dialog with a Cancel-Button and a TextBox to have the status, like "Waiting for transmission", "Receiving" and "Transmission finished".
I think i just need a starting point how to realise it, some things in windows programming are not very clear to me.
Thanks for any sugestions and ideas.
Dieter
'edited because of typo
Comment