swatcat5555
asked on
regarding label updation
hi,
In mscomm_event() i have a label which display the value of integer variable which is incremented in mscomm_event().Its not getting updated when data is continuously coming in the mscomm_event().It gets updated only after all the data is received.how to display the value in the label when mscomm_event is triggred each time.kindly help me regarding this
In mscomm_event() i have a label which display the value of integer variable which is incremented in mscomm_event().Its not getting updated when data is continuously coming in the mscomm_event().It gets updated only after all the data is received.how to display the value in the label when mscomm_event is triggred each time.kindly help me regarding this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Depending on what your case is you need to choose which to use. If you use the .Refresh method you will only update the label but if you use the DoEvents method you will update all controls that are visible. DoEvents lets the system (Windows) take over for a period of time to do some system work and when it has finished that it will return the control to the application. A refresh event can be stored in the system list of things to do and that's why your control will be updated after DoEvents.
If you have a application that will run for several minutes you should use DoEvents because then the application will not slow down so much during time, otherwise your app will consume the power from the system.
If you have a application that will run for several minutes you should use DoEvents because then the application will not slow down so much during time, otherwise your app will consume the power from the system.
ASKER
thanx a lot.
use doevents after