Morgen,
ich habe vor kurzen einen tollen VB Code gefunden mit dem ich einen scrollenden Text erzeugen kann.
Hier dazu einmal den Quelltext:
_Add the following code to the General
Declarations section of Form1 (note that
the Declare statement must be typed as a
single line of code):
Const SRCCOPY = &HCC0020
Const ShowText$ = „This line of text scrolls vertically.“
Private Declare Function BitBlt Lib „GDI32“ (ByVal hDestDC As Integer, ByVal X
As Integer, ByVal Y As Integer, ByVal nWidth As Integer, ByVal nHeight
As Integer, ByVal hSrcDC As Integer, ByVal XSrc As Integer, ByVal YSrc
As Integer, ByVal dwRop As Long) As Integer
Dim ShowIt%
Add a Picture Box control to Form1.
Picture1 is created by default. Set its
ScaleMode property to 3-Pixel.
Add a Timer control to Form1. Timer1 is
created by default. Set its Interval
property to 25.
Add the following code to the Timer event
for Timer1 (note that the Ret = line must
be typed as a single line of code):
Private Sub Timer1_Timer()
Dim Ret As Integer
With Picture1
If (ShowIt% = 30) Then
.CurrentX = 0
.CurrentY = .ScaleHeight - 30
.Print ShowText$
ShowIt% = 0
Else
Ret = BitBlt(.hDC, 0, 0, .ScaleWidth,
.ScaleHeight - 1, .hDC, 0, 1, SRCCOPY)
ShowIt% = ShowIt% + 1
End If
End With
End Sub_
Mein Problem ist der fett markierte Teil im Code. Das PictureBox Steuerelemt hat keine Funktion „print“.
Wie kann ich in einer PictureBox einen Text ausgeben?
Danke
Michael Schieferer