Page 1 of 1
QB4.5 vs Windows Vista
Posted: Mon Feb 19, 2007 1:11 am
by surturz
Anyone trying to run QB45 programs under Windows Vista?
Problems I've had so far...
1) Full screen mode - depending on the graphics card driver you are using, you may not be able to run in full-screen mode, which will stop you using anything but SCREEN 0. One work around is to "upgrade" your video card driver to "VGA Driver", but this is pretty unsatisfactory. Another option is to use a DOS emulator such as Dosbox (dosbox.sourceforge.net/) or perhaps recompile under FreeBASIC if you can.
2) SHELL Command. There is something really screwy with the QB45 SHELL command under Vista. Commands get truncated and don't work well. QB45 SHELL has never been great, I think QB45 has its own version of MS-DOS built in or something - SHELL "ver" reports MS-DOS version 5.00.500. (ver under Vista cmd.exe reports 6.00.600). I've been thinking that creating a .BAT file and SHELLing to that might be a workaround, but I still haven't worked out how to use the 'real' versions of DIR etc. Anyone got ideas?
Posted: Wed Feb 28, 2007 3:44 am
by surturz
I've done a bit more experimenting... SHELL does work generally, but SHELLing to "DIR" or "COPY" does not work. If you can upgrade to QBX you can use the DIR$() function instead of shelling to DIR, and I wrote the following routines to replace shelling to COPY.
Code: Select all
SUB CopyFiles (filespec$, destdir$)
'copies files matching srcdir$ & filespec$ to the directory destdir$
'cannot copy & rename
'IN: filespec$ filespecification to copy e.g. "C:\TEMP\junk.*"
' destdir$ destination directory
blocksize& = 1024
CALL ParseOutDir(filespec$, srcdir$, filenamespec$)
f$ = DIR$(srcdir$ + filenamespec$)
DO WHILE f$ > ""
IFH = FREEFILE
OPEN srcdir$ + f$ FOR BINARY ACCESS READ AS #IFH
OFH = FREEFILE
OPEN destdir$ + f$ FOR BINARY ACCESS WRITE AS #OFH
blockcount& = LOF(IFH) \ blocksize&
t$ = SPACE$(blocksize&)
FOR i = 1 TO blockcount&
GET #IFH, 1 + blocksize& * (i - 1), t$
PUT #OFH, 1 + blocksize& * (i - 1), t$
NEXT i
remainder& = LOF(IFH) - blockcount& * blocksize&
t$ = SPACE$(remainder&)
GET #IFH, 1 + blocksize& * blockcount&, t$
PUT #OFH, 1 + blocksize& * blockcount&, t$
CLOSE #IFH
CLOSE #OFH
f$ = DIR$
LOOP
END SUB
SUB ParseOutDir (fullfilename$, path$, filename$)
'IN: FullFilename$ filename and path
'OUT: Path$ path only with trailing \
' Filename$ filename no path
lsp = 0'last slash pos
FOR i = LEN(fullfilename$) TO 1 STEP -1
IF MID$(fullfilename$, i, 1) = "\" THEN lsp = i: EXIT FOR
NEXT i
IF lsp = 0 THEN
path$ = ""
filename$ = fullfilename$
ELSE
path$ = LEFT$(fullfilename$, lsp)
filename$ = MID$(fullfilename$, lsp + 1)
END IF
END SUB
Posted: Thu Mar 01, 2007 10:19 pm
by Ralph
surturz:
Since I had problems getting QuickBASIC 4.5 to work in full screen mode properly when I got myself a new computer with Window XP, and many people put the blame on Microsoft and XP, but, still, I caught glimmers of hope, I persisted. Na_th_an, a Spain-based real guru, said once or twice, that my problems seemed to him to be due to some background-running program. I took his advice, and finally discovered that a file, "flatbet.exe", that ran on startup and kept running in the background, was the culprit.
So, based on the above, would it not be important to give that a check? In my XP, I went to Start, Run, and entered msconfig. There, I clicked on the last tab, "Startup", and clicked on the button on the bottom-left, "Disabale All", rebooted, opend QuickBASIC, and everything worked fine! I then went back to msconfig, and did the "Enable All", and...same problem. By eliminating the last half, I found the culprit to be there, and, by continuing to enable half of the remaining "Startup item"s, I finally aisolated the one program that had given me the woes. Needless to say, that one program is now permanently unchecked. In fact, I don't beleive I need it, but, I hesitate to delete it...
I just now checked the SHELL "DIR" in the full-screen QuickBASIC 4.5, and, it worked fine. Perhaps your problems may go away too, or, at least, diminish, when you disable all the progams set to start on bootup!
Posted: Fri Apr 27, 2007 8:26 am
by surturz
Thanks for those hints, I might try it out. I'm pretty sure the problem is when you have a widescreen monitor.
I've since moved to using DOSBOX (from sourceforge). Needs a bit of fiddling to get it to work. Main problem is no printing. Also Ctrl-Break doesn't work (although Ctrl-ScrLk seems to break properly on my computer).
Posted: Sat Apr 28, 2007 12:03 am
by Ralph
I am interested in knowing if my suggestion has any merit for your case, so, please be sure to post any results you obtain. And, thank you.