Re: Label.text won't change.
1. What does SyncLock Form_PG_Collect_Master_ID_Label do?
2. Why do you have two " before ID
Re: Label.text won't change.
What is the synclock about? Are you running this on a different thread?
cnt should be cnt.ToString, though that is unlikely to have any impact. I would guess that something you are doing is throwing an exception, which is being caught and consumed without showing any message. Where that could be happening is anybodies guess. Perhaps you know of some likely error handler.
Re: Label.text won't change.
The extra " was just a copying error while posting. There is no error handling and yes this is working from threading... A thread is controlled from a checkbox on the main form (checked=running/start,unchecked=paused). Unchecking on the main form will launch this sub (located on a different form) and pass in -1 for the label to update with "paused". If the thread is running (it runs on a different form), it will call the sub and update what cnt is (the number of loops the thread has ran through).
changing to cnt.tostring has not made a difference. I also tried just another string without the variable and that failed to update as well (tried "hi").
Re: Label.text won't change.
My guess would be that your form is not refreshing. Try calling me.refresh to redraw the form, which will update the label. If you are in a tight loop, you may only want to do this at some interval or every 100 loops.
Re: Label.text won't change.
So a background thread is updating a control on the UI thread? That should raise a cross threading exception.