Wonky mouse control - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +--- Thread: Wonky mouse control (/thread-9214.html) |
Wonky mouse control - Zack - 04-25-2006 Is there something I'm missing here? This is supposed to operate so that you click somewhere, a dot is set there, and then you click somewhere else and a line is drawn between the two points. Sometimes the line is drawn, sometimes it isn't, and sometimes it's drawn in seemingly weird places. Code: screenres 320,200 [EDIT]Alright, there is something seriously wrong. Code: screenres 320,200,8,2,1 Wonky mouse control - Antoni Gual - 04-26-2006 Zack: Code: dim mousex, mousey,mousex2,mousey2,mb,mb2,x,y -Mouse button presses last long, you have to wait for its release or they will propagate to your next reads. -Freebasic sets mouse buttons to -1 if you click them out of the window. At that moment x and y are -1 too, so to avoid lines starting and ending at -1,-1, check for thhe real value of the left click, that's 1 -In FB for Windows 320 x 200 is a SVGA mode, most modern cards does'nt support resolutions that low in SVGA. Check SCREENLIST to see if it's supported. BTW: Did you finished your trike? Wonky mouse control - Zack - 04-26-2006 Thanks Antoni, I didn't know that. It works now. And...um, trike? I wasn't building a trike...? Wonky mouse control - KiZ - 04-26-2006 Quote:And...um, trike? I wasn't building a trike...? http://forum.qbasicnews.com/viewtopic.php?p=84062#84062 *smacks* :P Wonky mouse control - Antoni Gual - 04-26-2006 It did'nt go far, I see Wonky mouse control - Zack - 04-26-2006 Oh, that. I call it a go-kart, not a trike. I never ended up building it. Not enough cash. |