Graphical Interface

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
flukiluke
Newbie
Posts: 8
Joined: Sun Nov 07, 2010 6:34 am

Graphical Interface

Post by flukiluke »

Hello all
I want to add GUI interface to a program I'm working on, preferably with mouse support. What is the best (and fastest) way to create the different screens, add buttons etc? The mouse itself is not too much of a problem. I am using QB4.5. Any help would be greatly appreciated. Thanks!
Last edited by flukiluke on Thu Jul 28, 2016 7:09 am, edited 1 time in total.
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Post by burger2227 »

Fastest way is to get the mouse working and print the mouse coordinates so that you can locate the button coordinates. You could also set a click to PSET a pixel when a mouse button is clicked. So you can map the screen.

If you are using a graphics screen use LINE to make the button boxes. Then record the top left corner and bottom right corner positions you would like. The LINE code will tell you the area where a click would "press" the button.

Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
flukiluke
Newbie
Posts: 8
Joined: Sun Nov 07, 2010 6:34 am

Post by flukiluke »

burger2227,
Thankyou so much for your idea. I will try it out straight away.
Post Reply