Selecting Menu title halts code

Just starting out? Need help? Post your questions and find answers here.
longwave
New User
New User
Posts: 8
Joined: Thu Nov 28, 2013 9:36 pm

Selecting Menu title halts code

Post 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
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Selecting Menu title halts code

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
infratec
Always Here
Always Here
Posts: 7622
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Selecting Menu title halts code

Post by infratec »

Hi,

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

Bernd
Post Reply