Table of Contents


Code

GraphicsWindow.BackgroundColor = "Black"    
GraphicsWindow.PenColor = "White"    
GraphicsWindow.MouseDown = OnMouseDown    
GraphicsWindow.MouseMove = OnMouseMove      
Sub OnMouseDown      
  prevX = GraphicsWindow.MouseX      
  prevY = GraphicsWindow.MouseY    
EndSub      
Sub OnMouseMove      
  x = GraphicsWindow.MouseX      
  y = GraphicsWindow.MouseY      
  If (Mouse.IsLeftButtonDown) Then        
    GraphicsWindow.DrawLine(prevX, prevY, x, y)      
  EndIf      
  prevX = x      
  prevY = y    
EndSub  

Screenshot



See Also