mouse useage - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: mouse useage (/thread-665.html) Pages:
1
2
|
mouse useage - Ruudboy - 04-20-2003 can someone tell me how you make buttons in qb and use a mouse to activate them. so i assume that you would use the call statement to goto another window another question: how do you make windows that move and if you click the cross it shuts the window down like in an operating system mouse useage - na_th_an - 04-20-2003 Please correction. Moving windows and stuff are not things of an operating system, but a windowing envirment. MSDOS is an OS and doesn't have moving windows itself, Windows 3.1 has moving windows and it is not an OS. There are several ways of making windows, but it is not a simple task. You need a windows manager, a portion of code which just checks for clicks and keeps track of where every window is, to know if the user clicked on a window or not, and on which window the user clicked. It is somewhat complex. If you want windows management without doing a line of code switch to Visual Basic, where windows are automaticly managed by the runtime. In QB, you have to code the windowing interface completely from scratch. In VBDOS, you have those neat windows in text mode. The other question about having a clickable button: Well, it is done separately. Usually, you have a SUBroutine to draw the shape, and then you make loops to check if the user clicked. When the user clicks, you just check where, and that way you know if he or she clicked on a button and on which one he or she clicked. mouse useage - momoguru - 04-22-2003 im not the greatest qb progger, but heres how i did it im using a font sub, though u dont 'need' one for this to work, just replace the font calls to print and adjust the X,Y cords for 'locate'ing where the button text should go. ps, if anyone can improve this for me, id be grateful Code: DECLARE SUB button (X%, Y%, L%, H%, label$, Bcol%, Tcol%, stall%, mode%) mouse useage - momoguru - 04-22-2003 heres my window one as well, its a graphical window, not just boxes the window image is divided like this --- --- --- |a| |b| |c| --- --- --- |d| | | |e| --- --- --- |f| |g| |h| --- --- --- Code: DECLARE SUB windowmake (X%, Y%, W%, H%, wintitle$, mode%) mouse useage - na_th_an - 04-22-2003 Momoguru, your windowing/gui routines are really neat. Here you can download the ones I did 5 years ago: http://usuarios.lycos.es/qbsux/guis.html Not that "good loking" as yours, but I felt like showing them mouse useage - momoguru - 04-22-2003 really, i guess im not as far behind as i thought... although i know they can be improved...'hint hint' mouse useage - R@dioman - 04-23-2003 here's one I made a few years ago. (right-click, save) www.geocities.com/juice801980/windowmk.bas mouse useage - Ruudboy - 04-23-2003 momonguru i can't get your routines to work mouse useage - momoguru - 04-23-2003 explain what it is your doing / using, and ill tell you / give you what you need. first off for the window routine, u will need to create, or use my window graphic AND use my font (or a font) routine. if you would rather me upload everything for a GUI demo, lemme know and i will. mouse useage - Ruudboy - 04-24-2003 can you do that please |