What I'm trying to do with this program is to have the alphabet written on line 3 starting at column 0 then have the set of counting numbers written on line 2 starting at column 13. The stuff to do this is in the locate() subroutine and ought to be proper ansi.sys code. The locate command was in qbasic and since no console-based equivalent exists I figured to experiment and see if one could be written that uses ansi code. An alternative I have working now is to fill a 2,000 character array and have basic write it to the screen for me then clear that array and reload that array before writing again.

Option Strict On
Imports System
Imports System.text
Imports Microsoft.visualbasic
Module Module1
Public ws As String=""
public ro as ushort =0
public co as ushort =0
public ls As String =chr(27)+chr(84)
public ms as string =";"
public rs as string ="H"

Sub Main()
dim astring As String ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
dim nstring As String ="0123456789"
ro=3
co=0
locate()
console.writeline(astring)
ro=2
co=13
locate()
console.writeline(nstring)
end sub

sub locate()
ws = ls
ws = ws + ltrim(tostring(ro))
ws = ws + ms
ws = ws + ltrim(tostring(co))
ws = ws + rs
console.write(ws)
End Sub

End Module

_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb

Reply via email to