SOLVED: Checkbox and RadioButton appearance bug |
Post Reply |
Author | |
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
Posted: 13 August 2008 at 1:51am |
Both checkbox and radiobutton lose their appearance during Click event.
To reproduce just add checkbox to a form, set appearance to anything other than 0 and add this code: Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub CheckBox1_Click() 'simulate a long running routine Sleep 1000 End Sub When object is clicked it's appearance reverts to standard for the duration of the click event. Can this be fixed for next version? |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
If your process is suspended like sleep you can't process any event's or windows-messages.
This is by windows-design.
I think, this can't be solved by CJ.
If i have long running functions i show a modal-form with a progress-bar and do some DoEvents.
|
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
Thanks Baldur. You gave me an idea.
The procedure is not that long running, just maybe half a second, but drawing problem very visible. I thought maybe CJ could ensure control is redrawn before raising the click event. However, adding DoEvents at start of click event procedure fixes the problem. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |