There are many problems with this code. The first is that the ON LPRINT vector which is stored in the PRHANDLE at offset 70 (usually, but not always) will be saved in the old PR handle and will cause a crash. Next, changing the record is seldom going to affect the printable area. That is done in different places by different drivers. There are supposed to be new calls (within the last two years) that handle this type of thing, but I have not investigated them. (I've been busy drinking beer and sleeping.) Perhaps some wise soul will take over the task for me. :) >Ok, I know you incredible guys can help me solve this issue much >faster/better than I can. I have a bit of a problem with my printer stuff. >When people change from a dot-matrix to a laser printer they frequently (if >they even do the page setup stuff), set it to Letter (Small) instead of >letter. The stuff that needs to be printed at that time will not be >correct. > >I need for the program to examine the page setup stuff and modify itself >without asking/showing them, if it is on the laser printer. I assume the >code here can get the data but how may I modify it so that it THINKS it is >setup to Letter? > >The second question is, can the code also be used to change the settings a >little more? Specifically, I would like to extend the printer area about >.25 inch down. I don't want them to do the custom page setup to do this, >would like the code to be able to do it invisibly. > >This is used when I am printing. > >LOCAL FN getPage (@rectPtr&) > BLOCKMOVE [PRHANDLE]+_prInfo+_rPage,rectPtr&,8 > CALL INSETRECT (#rectPtr&,1,1) >END FN > >This is the actual code that I use with FBII when they do select page setup >under the FILE menu. > >LOCAL FN GetPageSetup > DIM gPaper.8 > DIM gPage.8 > DIM storeHndl& > storeHndl& = FN GETRESOURCE(_"PREC",5) > LONG IF storeHndl& > BLOCKMOVE [storeHndl&],[PRHANDLE],FN GETHANDLESIZE(PRHANDLE) > END IF > BLOCKMOVE [PRHANDLE] + _rPaper,@gPaper,8 > BLOCKMOVE [PRHANDLE] + _prInfo + _rPage,@gPage,8 >END FN > >LOCAL FN SavePageSetup > DIM resHndl& > resHndl& = FN HANDTOHAND(PRHANDLE) > FN pGreplaceRes(resHndl&,_"PREC",5,"") >END FN > >Thanks > >The Dummy, >Terrald > > >-- >To unsubscribe, send ANY message to <futurebasic-unsubscribe@...> Best, -STAZ ~)~ 800.348.2623 Orders http://www.stazsoftware.com 228.255.7086 FAX mailto:staz@...