Print Page | Close Window

SOLVED: Checkbox and RadioButton appearance bug

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11805
Printed Date: 16 November 2024 at 8:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Checkbox and RadioButton appearance bug
Posted By: ijwelch
Subject: SOLVED: Checkbox and RadioButton appearance bug
Date 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?





Replies:
Posted By: Baldur
Date Posted: 14 August 2008 at 7:19am
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.


Posted By: ijwelch
Date Posted: 14 August 2008 at 9:46pm
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.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net