fork download
  1. Public Class Form1
  2.  
  3. Private Function jiggered(x As Integer) As Integer
  4. jiggered = x + 1
  5. If jiggered = 4 Then jiggered = 0
  6. End Function
  7.  
  8.  
  9. Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles MyBase.Paint
  10. Dim pic As Graphics = e.Graphics
  11. Dim mypen As New Pen(Color.Black, 1)
  12.  
  13. Dim linelength = 1
  14. Dim iters = 17
  15.  
  16. Dim pattern As Integer()
  17. ReDim pattern(2 ^ (iters - 1))
  18.  
  19. Dim patternpointer = 0
  20. pattern(patternpointer) = 0
  21.  
  22. Dim ree As Integer
  23. For n = 2 To iters
  24. ree = patternpointer
  25. For nn = ree To 0 Step -1
  26. patternpointer += 1
  27. pattern(patternpointer) = jiggered(pattern(nn))
  28.  
  29. Next
  30. Next
  31.  
  32. Dim cursorx As Integer = 1280 / 2 + (1280 / 4)
  33. Dim cursory As Integer = 720 / 2
  34.  
  35. For n = 0 To patternpointer
  36. Select Case pattern(n)
  37. Case 0
  38. pic.DrawLine(mypen, cursorx, cursory, cursorx - linelength, cursory)
  39. cursorx -= linelength
  40. Case 1
  41. pic.DrawLine(mypen, cursorx, cursory, cursorx, cursory + linelength)
  42. cursory += linelength
  43. Case 2
  44. pic.DrawLine(mypen, cursorx, cursory, cursorx + linelength, cursory)
  45. cursorx += linelength
  46. Case 3
  47. pic.DrawLine(mypen, cursorx, cursory, cursorx, cursory - linelength)
  48. cursory -= linelength
  49. End Select
  50. Next
  51.  
  52. mypen.Dispose()
  53.  
  54. End Sub
  55. End Class
  56.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


/home/JhnAAF/prog.vb (9,66) : Error VBNC30451: Could not resolve the name 'PaintEventArgs'
There were 1 errors and 0 warnings.
Compilation took 00:00:00.7262300
stdout
Standard output is empty