QBasic works in dos. If you don't have an actual LPT1 port, it probably can't print, especially since all moder printers are USB. if you have a USB printer attached, you need to enable file and printer sharing, then share the printer. Next you need to open a command prompt as admin and use this command.

net use lpt1: <\\computer_name\printer_share_name> /persistent:YES

substituting computer name with your computer's name and the printer_share_name with your actual printer share name. this will redirect LPT1 to your usb printer even if you don't have an actual LPT port.