Problem With SetActivePage & SetVisualPage

Ok, I'm having problems with setactivepage and setvisualpage commands in Turbo Pascal.  Its just that everytime I flip a page (for example from page 0 to page 1) the page the visual page starts off the screen.  For example...if I drew a box at 100, 100, 200, 200 on page 0, then setactivepage (1) and drew the same box and then setvisualpage(1), the box would move higher on the screen...there's a difference of about 32 pixels from what I can tell.  Does anyone know how to fix this problem?
Corey080698Asked:
Who is Participating?
 
sumant032199Connect With a Mentor Commented:
You dounload svga256.bgi file from:
http://www.math.tau.ac.il/~daniel/Graphics/Exercises/svga256.bgi 

This should work. If it doesn't then I suspect your graphics card. You are using 256 color graphics in some resolution(640x480) and also multiple pages. To handle this you must have a large amount of memory available for the video card.

0
 
nricoCommented:
Ummmm... not using BGI!!??

(Seriously, I don't know. Maybe the problem lies within your video card)
0
 
Corey080698Author Commented:
Okay, well for the BGI thing I have the
following line in my program

uses Graph;

I then later intialize the graphics mode and all that.

My video card is an ATI All-In-Wonder 4M PCI...never had a problem with it before...but then I've never done page flipping with it either.  Any more suggestions or comments?
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
VIBESPROCommented:
I do alot of page flipping and had similiar problems because of how my procedures were written.  There was an increment in one of my variables.  

You may need to correct those pagefliiping procedures...
what's you email address so I can send it over.

0
 
Corey080698Author Commented:
my email address is corey@mnsi.net... I have actually figgured it out...Instead of just using the following commands:
driver:=detect;
mode  := 2;
initgraph (driver, mode, '');

Instead of using the default driver, I installed my own driver and then tried and it worked great.  Thanks for all your help everyone.
0
 
kamareyCommented:
Which driver do you use? For using another driver you should use procedure: installuserdriver(...);
0
 
Corey080698Author Commented:
I'm using the BGI256.BGI driver...all I did was just change the code (see previous messages) to the following:

driver := InstallUserDriver ('BGI256', nil);
mode := 3;
initgraph (driver, mode, '');

everything seems to be working fine
0
 
kamareyCommented:
Try to use the driver "svga256.bgi". I think this driver will be better.
0
 
VIBESPROCommented:
great for you....I'll still send it though
0
All Courses

From novice to tech pro — start learning today.