Page 1 of 1

Selecting Menu title halts code

Posted: Thu Jan 23, 2014 1:24 am
by longwave
I have a program with main window that checks for rs-232 input and displays characters in text window. All works fine. I just added a CreateMenu and MenuTitle. When I click on the menu title the polling of the comm port stops. Is there a way to continue polling of the comm port or checking of other Events even though the #PB_Event_Menu has triggered but the Event has not completed ?

- Martin

Re: Selecting Menu title halts code

Posted: Thu Jan 23, 2014 3:44 am
by IdeasVacuum
Just add a variable whose value is changed when the event is completed. So, when you click on the menu title, your code tests the variable value and does not stop the polling until the variable val has changed.

Re: Selecting Menu title halts code

Posted: Thu Jan 23, 2014 7:54 am
by infratec
Hi,

since I very often do such serial stuff:
Use an own thread for the communication stuff.

Bernd