Link to home
Start Free TrialLog in
Avatar of Corey080698
Corey080698

asked on

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?
Avatar of nrico
nrico

Ummmm... not using BGI!!??

(Seriously, I don't know. Maybe the problem lies within your video card)
Avatar of Corey080698

ASKER

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?
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.

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.
Which driver do you use? For using another driver you should use procedure: installuserdriver(...);
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
Try to use the driver "svga256.bgi". I think this driver will be better.
great for you....I'll still send it though
ASKER CERTIFIED SOLUTION
Avatar of sumant032199
sumant032199
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial