Home All Groups Group Topic Archive Search About

form refresh? repaint? doevents?

Author
11 Apr 2006 6:11 PM
aaron.kempf@gmail.com
hey guys i have an ETL winform in VB 2005

and it's like-- off in la-la land.

i know it's doing things-- it's happily crunching away.  but i'm
confused about what i need to do to make the main form refresh... or
repaint..

it's like..   it just looks hung (sorta like me lol jk)
and i just want something that LOOKS AND ACTS like a real app.

what can i do to make the form repaint itself/?

thanks

im kinda new to .NET;
i'm an Olap DBA

Author
11 Apr 2006 6:23 PM
Ken Halter
<aaron.ke***@gmail.com> wrote in message
news:1144779096.564168.17860@e56g2000cwe.googlegroups.com...
> hey guys i have an ETL winform in VB 2005
>
> and it's like-- off in la-la land.
>
> i know it's doing things-- it's happily crunching away.  but i'm
> confused about what i need to do to make the main form refresh... or
> repaint..
>
> it's like..   it just looks hung (sorta like me lol jk)

Oh... so, it's only slightly hung, eh? ;-)

> and i just want something that LOOKS AND ACTS like a real app.
>
> what can i do to make the form repaint itself/?

Well, I'm a VB6'er so all I can suggest is DoEvents. The functionality that
DoEvents provides will need to be there, regardless of any syntax
differences, if the form has to repaint. One thing that seems to confuse a
lot of people is... Screen updates are low priority. If they suddenly became
high priority, every app known to man would instantly slow to a crawl. The
trick is to find that magical combination of "let the screen update" vs
"crunch the code and spit out the results"

> thanks
>
> im kinda new to .NET;
> i'm an Olap DBA

If you, or someone you know, is comfortable with quick VB6 migrations, here
are a couple of things that may help find that "magical combination"

Here's a contest winning article....

DoEvents evolution; the API approach. (Method for 100% optimized loops)
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=29735&lngWId=1

.....and a project built using techniques from that article....

Optimized loop (no more doevents)
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=37888&lngWId=1



--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..