Buchempfehlung
Visual Basic 6 Kochbuch
Visual Basic 6 Kochbuch
Viele praktische Tipps zum Programmieren mit Visual Basic 6, die sich oft auch auf FB übertragen lassen. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

TUI Creator, entbuggt

Uploader:Mitgliedraph ael
Datum/Zeit:03.04.2008 18:54:46

dim shared i as integer, die as byte = 0, f as integer

sub watch
    dim as integer x, y, ascii, b, sx, suy = 1, i
    dim as string folge
    do
        locate 22, 1
        color 15, 1
        print space(79);
        b = 0
        getmouse x, y,, b
        ascii = screen(y + 1, x + 1, 0)
        locate 22, 1
        print chr(ascii) + "    > " + trim(str(ascii))

        if b = 1 then
            sx = pos
            sx += 1
            if sx = 81 then sx = 1
            locate 23, sx
            folge += chr(ascii)
            locate 24, suy
            color 15, 0
            print chr(ascii);
            suy +=1
            if suy = 81 then suy = 1
        end if
        if b = 2 then
            locate 8, 1
            print "print chr(";
            for i = 1 to len(folge)
                print ", " + trim(str(asc(mid(folge, i, 1))));
            next
            print ")"

            f = freefile
            open "tui.bas" for append as #f
            print #f, "print chr(";
            for i = 1 to len(folge)
                print #f, ", " + trim(str(asc(mid(folge, i, 1))));
            next
            print #f, ")"
            close #f
            locate 21, 1
            color 13
            print folge
            folge = ""
        end if
        if b = 3 then
            color 7, 0
            sx = 0
            suy = 1
            folge = ""
            cls
            color 14, 0
            for i = 0 to 255
                print chr(i);
            next
        end if
        sleep 83
    loop until die = 1
end sub

color 14, 0
for i = 0 to 255
    print chr(i);
next

dim thWatch as any ptr
thWatch = threadcreate(cast(any ptr, @watch))

while inkey <> chr(27) : wend
die = 1
threadwait(thWatch)