Here is my (QB64) problem, obviously i want to create a box by clicking LMB. Can anyone help? And to Pete in the future is there going to be "QB64 Questions & Answers" forum or sub-forum or how the heck is that called?
SCREEN 9
_MOUSESHOW
DO
DO
LOOP WHILE _MOUSEINPUT
click = 0
IF _MOUSEBUTTON(1) and click = 0 then
click = click + 1
x = _MOUSEY
y = __MOUSEX
ELSEIF _MOUSEBUTTON(1) and click = 1 then
LINE (x,y)-(__MOUSEX,_MOUSEY),1,B
click = 0
END IF
LOOP
You are not using _MOUSEINPUT correctly! It is used to find out if new data is available so all of your _MOUSEBUTTON reads need to be inside of that loop.
Your CLICK variable will always be 0 because it is constantly reset to 0 every loop, but your second alternative already does that after the second click and click = 1. Take that line before the IF statement out. Even if you leave the loop because of mouse inactivity.
BTW I will not answer any more of your questions if you continue to wait days to reply or just get what you want and do not reply! This has happened WAY TOO OFTEN!