?
Solved

How do i stop flickering graphics

Posted on 1998-09-08
6
Medium Priority
?
201 Views
Last Modified: 2010-04-30
I have 6 picturebox controls and load each of them with a command button control array.  The zorder at design time of the picture boxes is 5 to 0 and the corresponding control index is 0 to 5 connecting to the corresponding command buttons 0 to 5.  When i click command control button 0 the picturebox being loaded flickers and the background show through.  It also happens at some other points in the app.  How can i stop the flickering?
0
Comment
Question by:emidiod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:VBDesigns
ID: 1433615
Try using the LockWindowUpdate API to turn off the Window refreshing of the parent (i.e. the VB Form) for the period between the load(s) and refresh of the pictures:

Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long

Good luck!

Dave
0
 

Author Comment

by:emidiod
ID: 1433616
Thanks, i tried it, but it the background still flickers through before loading the picture box
0
 
LVL 14

Expert Comment

by:waty
ID: 1433617
Hide the picture when you load the bitmap. Show it when all is loaded.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:emidiod
ID: 1433618
Thanks but I am doing that.  There seems to be a zorder problem in VB.  If i have 3 picture boxes say pic1 , pic2 and pic3 and their zorders are 2,1,0 respectively (ie pic3 is on top).  Whenever i load pic2 and pic3 everything is OK, but when i bring pic1 to the front by changing its ZORDER the form background flickers through.  Is there a solution
0
 

Expert Comment

by:jfayling
ID: 1433619
I sure you already did this, but I guess I have to ask.  Have you set the autoredraw property of the picturebox to true?
0
 
LVL 2

Accepted Solution

by:
AllenC_Jr earned 210 total points
ID: 1433620
What Pictures are You Loading into the Picture Boxes? If they are gif's then that is your problem, gif's have that problem with flickering. If you are not using a transparent background then do this(if you are loading the pictures)

pic1.AutoRedraw=True
Pic1.PaintPicture LoadLicture(Filename)
pic1.AutoRedraw=False

Or if the pics are already loaded do this

pic1.AutoRedraw=True
Pic1.PaintPicture Pic1
pic1.AutoRedraw=False
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

719 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