Private Sub creatz_Click(sender As Object, e As EventArgs) Handles creatz.Click
Dim i As Integer = 0
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("D:\notch.tap", True, System.Text.Encoding.Default)
file.WriteLine("G90")
file.WriteLine("G1 Z" & zr.Text & " F2000")
file.WriteLine()
While i < zd.Text
file.WriteLine("G1 Z-" & i + zs.Text & " F" & zf.Text)
file.WriteLine("G1 Z" & zr.Text)
i = i + zs.Text & vbNewLine
End While
file.Close()
End Sub