volta
Anmeldungsdatum: 04.05.2005 Beiträge: 1876 Wohnort: D59192
|
Verfasst am: 16.05.2006, 19:54 Titel: Text scrollen |
|
|
Hi,
eine Funktion die den Quelltext (jeden anderen Text auch) von unten nach oben scrollt.
Den Quellcode als scroll_test.bas speichern.
Code: | '15.05.06 , ab FB 0.15b erstellt by Volta
'Text scrollen
Option Explicit
Declare Function scrollup (ByVal steps As UShort, _
ByVal delay As UShort) As Integer
Screen 18, 32
windowtitle "Text scrollen"
Dim text As String
Dim ff As IntegerOpen "scroll_test.bas" For Input As #ff
Do Until EOF(ff)
Line Input #ff,text
scrollup 16, 19 'Schriftgroesse, Sleep [ms]
Locate 30, 1: Print text;
Loop
Close #ff
Sleep
End
Function scrollup (ByVal steps As UShort, ByVal delay As UShort) As Integer
Dim scr As integer Ptr
Dim As Integer breit, hoch, bytepp, pitch, i, j, x
ScreenInfo breit, hoch,, bytepp, pitch
If bytepp <> 4 Then
Function = -1
Exit Function
End If
For x = 1 To steps
ScreenLock
For i = 1 To hoch-2
scr= ScreenPtr + i*pitch
For j = 0 To (breit-1)
scr[j]= scr[j+(pitch Shr 2)]
Next j
Next i
ScreenUnlock
Sleep delay
Next x
Function =1
End Function |
Hier mehr: http://volta.de.tt/scroll.html
Gruß Volta _________________ Warnung an Choleriker:
Dieser Beitrag kann Spuren von Ironie & Sarkasmus enthalten.
Zu Risiken & Nebenwirkungen fragen Sie Ihren Therapeuten oder Psychiater. |
|