Solved

VB5 Screen Flicker?!?

Posted on 1998-08-17
7
317 Views
Last Modified: 2008-03-10
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
0
Comment
Question by:garymace
7 Comments
 

Expert Comment

by:AndrewNg
ID: 1429384
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
 

Author Comment

by:garymace
ID: 1429385
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
 
LVL 7

Expert Comment

by:kamall
ID: 1429386
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:garymace
ID: 1429387
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
 

Expert Comment

by:captain_needa
ID: 1429388
So, who get's the points that are still stuck?
0
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1429389
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
 
LVL 1

Accepted Solution

by:
kdimmock earned 50 total points
ID: 1429390
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
change vba from autofit to 13.5 width? 4 28
A macro to Count the number of rows across all worksheets 3 78
VBA filters 2 49
VB6 - Compare and highlight cell not the same 3 42
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now