I'm trying to make a drawing on one of the forms I'm working on which requires a bunch of lines. I had an idea to use the MouseDown Sub to determine the coordinates of the lines I want to draw, and then to post the results in the Immediate Window. Here's what I have so far:
VB Code:
  1. Private xco1 As Integer = 0
  2. Private xco2 As Integer = 0
  3. Private yco1 As Integer = 0
  4. Private yco2 As Integer = 0
  5. Private xy As Integer = 1
  6. Private line As String
  7. Private Sub frmButton_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
  8.     If xy = 1 Then
  9.         xco1 = e.X
  10.         yco1 = e.Y
  11.         xy = 2
  12.     Else
  13.         xco2 = e.X
  14.         yco2 = e.X
  15.         xy = 1
  16.         line = "(" & CStr(xco1) & ", " & CStr(yco1) & "), (" & CStr(xco2) & ", " & CStr(yco2) & ");"
  17.         Console.WriteLine(line)
  18.     End If
  19. End Sub
But I find that it isnt printing. I know that I can simply pop the text into another form's text box or label, but I'd much rather use not make an additional form nor add any more controls to the current form.
Any ideas?