[Beste Helpmij-ers,
Ik wou een lopende tekst in mijn projectje aanbrengen en nu heb ik wat bruikbare code op jullie site gevonden alleen als ik die in mijn code plakt met wat aanpassingen doet die niets. Hebben jullie wat tips waar het op fout gaat?
alvast bedankt rob
http://www.helpmij.nl/forum/showthread.php/688173-Bewegende-tekst-in-textbox!
Ik wou een lopende tekst in mijn projectje aanbrengen en nu heb ik wat bruikbare code op jullie site gevonden alleen als ik die in mijn code plakt met wat aanpassingen doet die niets. Hebben jullie wat tips waar het op fout gaat?
alvast bedankt rob
Code:
' Label1.Caption = "This is a test of a scrolling label with I hope a lot of text that will be bigger than the frame it is encapsulated within" ' for testing make this text larger than the width of the label
' Label1.Caption = CStr(TextBox1.Text)
With Label1
.Caption = "Welkom bij Rob's IJsco Winkeltje "
.Font.Bold = True
.Font.Size = 25
.Font.Name = "tahoma"
.ForeColor = vbRed
.TextAlign = fmTextAlignCenter
End With
Label1.Left = frmIJswinkel.Width 'Frame1.Width ' start the text from the right end of the frame
' you can change this to start the text anywhere within the frame.
' If CommandButton1.Caption = "Start Scroll" Then
' CommandButton1.Caption = "End Scroll"
Do
Sleep 20
Label1.Left = Label1.Left - 1 ' scroll the text left one pixel
If Label1.Left <= -Label1.Width Then 'check for the text disappearing
Label1.Left = frmIJswinkel.Width ' start the text at the right side of the frame
End If
DoEvents ' update
Loop
'End
' End If
http://www.helpmij.nl/forum/showthread.php/688173-Bewegende-tekst-in-textbox!
Laatst bewerkt: