FAQ003 = How can I access the Windows clipboard from QBasic?
1) You must have QBasic 4.5+
2) You must remember to use the /L switch to include the qb.qlb.
3) If you have NT, 2K, or XP then (thanks, Plasma) you need to run NTOLDAPP before calling QBasic /L. If you don't have this program, download:
Here is a demo program showing how the clipboard is accessed.
This accesses interrupt &H2F, functions &H17## to manipulate the text clipboard (there are different clipboards for the different types of data). Note that, if the clipboard contains a lot of data, then you may not be able to open it.
Your program needs to open the clipboard before using the rest of the subs/functions. It should keep the clipboard open for as little time as possible, because other programs can't use the clipboard while it is open.