DEF SEG and PEEK really not recommended for new code, just there for compatibility to old code.
Seems like perfect place to try Right Click in your code, instead of Left Mouse Button
PS your screen is too large for me to test the code as is and I think if I reduce the size I mess the setups to try.
Code: (Select All)
'=============================== free draw with mouse
If start1 = 2 Then
'use mouse to draw starting pattern
'draw STARTING GRID
For j = 1 To gx
For k = 1 To gy
Line (j * res1, k * res1)-(j * res1 + res1, k * res1 + res1), c1~&(mn(j, k)), BF
Next k
Next j
Do
Do While _MouseInput
Loop
x% = _MouseX
y% = _MouseY
'Locate 1, 1
'Print x%, y%
x1 = Int(x% / res1)
y1 = Int(y% / res1)
mn(x1, y1) = 1
'mn(x1 - 1, y1 - 1) = 1
'mn(x1 + 1, y1 - 1) = 1
'mn(x1 + 1, y1 + 1) = 1
'mn(x1, y1 + 1) = 1
'mn(x1 + 1, y1) = 1
'mn(x1, y1 - 1) = 1
'draw GRID
For j = 1 To gx
For k = 1 To gy
Line (j * res1, k * res1)-(j * res1 + res1, k * res1 + res1), c1~&(mn(j, k)), BF
Next k
Next j
lc% = _MouseButton(1) ' <<<< Why not _MouseButton(2) ?????
Loop Until lc% = -1
Seems like perfect place to try Right Click in your code, instead of Left Mouse Button
PS your screen is too large for me to test the code as is and I think if I reduce the size I mess the setups to try.
b = b + ...