|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
VB2008 program freezes
I've seen great advice for VB6 freezing, but I have the same problem in VB2008, and there ain't no doevents etc to make sure background things get tidied up. I have a small program which loops through each of the permutations of the digits 0123456789 - doing a test or three on each possibility. If I set the program running then click somewhere else on the screen the program appears to freeze but is actually still running. (I have the same problem with a larger database management program - so the problem is inadequate programming on my part).
I've got a screen refresh after each list update (I use a list to report every millionth test) but it still looks up - even if I put a me.enabled = false at the start of the routine. Can anyone shed light here for me please? |
|
#2
|
||||
|
||||
|
__________________
medialint.com "Beware of the man who works hard to learn something, learns it, and finds himself no wiser than before. He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." - Vonnegut - Cat's Cradle, 1963 |
|
#3
|
|||
|
|||
|
Ignorance revealed
Duh!
Many thanks. That solved the problem. As you gathered and were kind enough not to point out, I'm very new to VB2008 and am still finding my way through. Thanks again. Rory |
|
#4
|
||||
|
||||
|
Actually I never used VB 2005 much, and never used VB 2008 I'm mostly C# these days but I couldn't sleep not knowing the answer myself ;-) I'm an old VB6/VBA guy too when it comes to VB.
|
|
#5
|
||||
|
||||
|
Btw one more post and your rep power should be around 45 or so by now :-)
|
|
#6
|
||||
|
||||
|
Quote:
Classic. It's one way of saying, use quad core with 8G of memory when using VB2008. ![]() |
|
#7
|
|||
|
|||
|
Quote:
No, actually it's one way of pointing out that a single threaded application cannot be expected to have a responsive UI when computations are being performed. |
|
#8
|
||||
|
||||
|
Quote:
Wow thanks for the explanation. Now you made me look dumb. |
|
#9
|
|||
|
|||
|
Quote:
Not my intent. Application.DoEvents causes the message loop to process any messages in the queue. Because of this, it is possible to have re-entrancy issues if it is called from within an event handler; see this blog post for an example of that: http://www.codinghorror.com/blog/archives/000370.html |
|
#10
|
||||
|
||||
|
no offense but i know what doEvents does.
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > VB2008 program freezes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|