Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background programs halted?

Status
Not open for further replies.

infinitysquadron

Programmer
Aug 2, 2002
20
0
0
CA
I was taking a break from the game I've been working on for quite some time now to try out this idea I had. I downloaded this nice little text-to-voice program (and I don't mean one that was made with QBASIC) that speaks in one of those "Stephen Hawking's Computer" voices. Among other things, it will automatically read anything that is copied into the Windows clipboard.

After seaching around for a little while I found a QBASIC Library that allows you to write to the Windows clipboard. A QQBASIC program that talks... but something didn't quite work right.

My text-to-voice program normally runs in the background in the system tray, and read out anything that is copied into the clipboard. But when I ran the QBASIC program, the text that I wrote into the clipboard wasn't read until the program ended (right when it said "press any key to continue"). I tried compiling, but I This confused me.

Is this a problem with QBASIC?
Is this a problem with the reader?
Or is this a problem with Windows...?

I read somewhere (was it here...?) that in Windows XP that sometimes it would stop all other programs from running in the background while QBASIC was running to maintain stability. I'm running on Windows ME. Does this have anything to do with it...? Does anybody have any idea what could be causing this reaction? GOTO is the path to the Dark Side...
GOTO leads to disorganised programs...
Disorganised programs leads to unfinished programs...
Unfinished programs lead to suffering...
 
There are some windows functions... in this case the clipboard... that only execute after an application has given the system a moment to refresh. Windows programs do this automaticly, but QB is not a windows program. The breif gap between when your program stops executing and returns to the IDE is just enough to do this.

...All very true is what you have spoken. Unless you can safly contain your GOTO. Trap it. Use it. Then to the dark side you will not become.
 
Qbasic is a DOS program. If you are running it under Windows XP, it pauses all backgrond programs and single tasks Qbasic, so your text-to-voice proram would not be running
 
Windows 3.1 had nearly NO dos support from within the Windows enviroment, and it was patheticly slow and crash-prone if the program would run at all.

Windows95 is *nearly* the best, but, because it was their first version of an effective DOS prompt, had a few bugs that where fixed in Windows98.

If you *have* to run the program under Windows, W98 is your best shot. If you've allready got a working WindowsXP or Windows2000 installation and the Windows98 install disk, check out my FAQ on how to make a dual-boot system.
 
no way, Windows 3.1 is incredibly stable when running DOS programs. Thats what I do all of my Qbasic programming on. It has a DOS emulator that mimics DOS almost exactly. The clipboard format is the same as the rest of them and it is multitasking even the dos programs.
I still say 3.1 is your best bet
 
Well, I don't have 3.1. Well, actually I might down in my basement buried under boxes somewhere, but I do have Windows 95 up and running on another computer. I'll try it there and see if it produces different results... GOTO is the path to the Dark Side...
GOTO leads to disorganised programs...
Disorganised programs leads to unfinished programs...
Unfinished programs lead to suffering...
 
...All very true is what you have spoken. Unless you can safly contain your GOTO. Trap it. Use it. Then to the dark side you will not become.
 
That has not been my experence with Windows 3.1/3.11. The DOS box barly ran at all, and if you wanted to do anything usefull in DOS, you had to exit Windows and just do it in DOS anyway.

Perhaps it has somthing to do with the hardware configuration, but I never had any trouble with Windows95 DOS boxes, and Windows98 DOS boxes work even better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top