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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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
sumant032199Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Pascal

From novice to tech pro — start learning today.