Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - SOLVED: Checkbox and RadioButton appearance bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Checkbox and RadioButton appearance bug

 Post Reply Post Reply
Author
Message
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Checkbox and RadioButton appearance bug
    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?


Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.