If you must use a graphics window, check the code archives on this site, there are a couple of different solutions that should work for you.
How to get user input in BlitzPlus
BlitzPlus Forums/BlitzPlus Beginners Area/How to get user input in BlitzPlusThe forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.