VB5 Screen Flicker?!?

Hello,

I just upgraded from VB4 to VB5 and moved a current project over to VB5. When I run the code, I get noticable screen flicker when I refresh the main form. I did not get this flicker when using VB4.

Is this normal, and is there anything I can do to fix. I was under the impression that VB5 was supposed to be more effecient than VB4, but this makes me think otherwise..

Gary Mace
garymaceAsked:
Who is Participating?
 
kdimmockConnect With a Mentor Commented:
try using
Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long

hwndLock  is the hWnd of your form
call the function at the start of your form load/paint routines and when finished "painting" call again with 0 (to reset)
0
 
AndrewNgCommented:
I honestly don't think you're going to accept this answer but Visual Basic 5 does create alot of flicker.  I don't know if this is regular but it has happened to me before.  To reduce the flicker, you can try to either put the image control(I assume it is an image control) in a picture box, or use the paint command to manually paint the image.
Hope this will help you!
0
 
garymaceAuthor Commented:
AndrewNg

You may be right...but I used the same code and forms with VB4 and it didn't flicker, but once moved over to VB5 it flickers. Maybe there is another underlaying reason...

Gary
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
kamallCommented:
Try your code in VB3 and see how your program will run like a missile :-)
Unfortunately, we are going in the wrong direction with the upgrades. But can we do otherwise?
0
 
garymaceAuthor Commented:
The problem has been solved. Instead of refreshing the entire form, I refreshed only the image control array and that seemed to fix it.
0
 
captain_needaCommented:
So, who get's the points that are still stuck?
0
 
a111a111a111Commented:
Hi.
First it is advised to have VB 4.0 or VB 5.0 but not the two on the same PC.
If you go by that you should remove VB 4.0 from your PC and then ReInstall VB 5.0.

It will solve problems with some OCXs.

Also make an EXE from your program and tun it on a second PC to see if the System is not the one that "Having a problem".

Good luck.

http://www.hili.com/~shay
0
All Courses

From novice to tech pro — start learning today.