Problem solved :). Instead of closing the stream after the string is written, the writer has to be closed. Otherwise, the writer will only write the size of its buffer that apparently is 1024.
It works fine this way:
Stream = New IO.FileStream(FilePath, _
IO.FileMode.Create, _
IO.FileAccess.Write)
Writer = New IO.StreamWriter(Stream)
Writer.Write(Space(30000))
Writer.Close()