Click here to Skip to main content
15,918,168 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: project sample book Pin
Christian Graus3-Dec-08 14:17
protectorChristian Graus3-Dec-08 14:17 
QuestionString as Executable Code Pin
User 54091903-Dec-08 13:03
User 54091903-Dec-08 13:03 
AnswerRe: String as Executable Code Pin
Christian Graus3-Dec-08 13:53
protectorChristian Graus3-Dec-08 13:53 
QuestionHow can I make this loading animation work right? Pin
ikantspelwurdz3-Dec-08 6:52
ikantspelwurdz3-Dec-08 6:52 
AnswerRe: How can I make this loading animation work right? Pin
Dave Kreskowiak3-Dec-08 6:59
mveDave Kreskowiak3-Dec-08 6:59 
GeneralRe: How can I make this loading animation work right? Pin
Luc Pattyn3-Dec-08 7:02
sitebuilderLuc Pattyn3-Dec-08 7:02 
GeneralRe: How can I make this loading animation work right? Pin
ikantspelwurdz3-Dec-08 8:24
ikantspelwurdz3-Dec-08 8:24 
GeneralRe: How can I make this loading animation work right? Pin
Luc Pattyn3-Dec-08 8:50
sitebuilderLuc Pattyn3-Dec-08 8:50 
Hi,

your computations now are on a separate thread/BGW which is good.
but you still have a Thread.Sleep running on the GUI thread, which is a very bad idea.
and your Form1_Load handler still is waiting for the calculation to have finished,
which is absolutely not good. It prevents the GUI to do normal stuff, such as redrawing everything when you uncover the form.

It is the calculating thread/BGW that should trigger the animation/progress reporting;
that is what BGW.ReportProgress() is for.

Hence:
- remove the Sleep in Form_Load
- remove the while loop from Form_Load
- add animation to dostuff() through ReportProgress (which optionally accepts an object)

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Fixturized forever. Confused | :confused:


GeneralRe: How can I make this loading animation work right? Pin
ikantspelwurdz3-Dec-08 9:37
ikantspelwurdz3-Dec-08 9:37 
GeneralRe: How can I make this loading animation work right? Pin
Luc Pattyn3-Dec-08 10:07
sitebuilderLuc Pattyn3-Dec-08 10:07 
GeneralRe: How can I make this loading animation work right? Pin
Christian Graus3-Dec-08 8:52
protectorChristian Graus3-Dec-08 8:52 
QuestionEdit image in a text editor Pin
Gagan.203-Dec-08 4:39
Gagan.203-Dec-08 4:39 
AnswerRe: Edit image in a text editor Pin
Thomas Stockwell3-Dec-08 6:24
professionalThomas Stockwell3-Dec-08 6:24 
AnswerRe: Edit image in a text editor Pin
Christian Graus3-Dec-08 8:53
protectorChristian Graus3-Dec-08 8:53 
QuestionVBA Question Pin
EliottA3-Dec-08 2:59
EliottA3-Dec-08 2:59 
AnswerRe: VBA Question Pin
Dave Kreskowiak3-Dec-08 4:11
mveDave Kreskowiak3-Dec-08 4:11 
GeneralRe: VBA Question Pin
EliottA3-Dec-08 4:20
EliottA3-Dec-08 4:20 
QuestionHow to insert multiple checkbox value into database using VB Pin
sumit52833-Dec-08 1:30
sumit52833-Dec-08 1:30 
AnswerRe: How to insert multiple checkbox value into database using VB Pin
Guffa3-Dec-08 2:23
Guffa3-Dec-08 2:23 
GeneralRe: How to insert multiple checkbox value into database using VB Pin
sumit52833-Dec-08 18:50
sumit52833-Dec-08 18:50 
AnswerRe: How to insert multiple checkbox value into database using VB Pin
Nanda_MR3-Dec-08 22:02
Nanda_MR3-Dec-08 22:02 
Questionhelp with Antialiasing Pin
onlyehtisham3-Dec-08 0:46
onlyehtisham3-Dec-08 0:46 
GeneralRe: help with Antialiasing Pin
Luc Pattyn3-Dec-08 1:16
sitebuilderLuc Pattyn3-Dec-08 1:16 
GeneralRe: help with Antialiasing Pin
onlyehtisham3-Dec-08 7:05
onlyehtisham3-Dec-08 7:05 
GeneralRe: help with Antialiasing Pin
Luc Pattyn3-Dec-08 8:46
sitebuilderLuc Pattyn3-Dec-08 8:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.