Re: Scrolling text in a stationary label help needed
- From: "Mike and Maureen" <Mike@xxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Sep 2006 19:09:26 +0100
.. . . and here's another one. Basically it's exactly the same as the last one, but it has a better message ;-)
(Remember to set a reference to DirectX7)
Mike
Option Explicit
Private objDX As New DirectX7
Private objDD As DirectDraw7
Private Sub Form_Load()
Set objDD = objDX.DirectDrawCreate("")
End Sub
Private Sub Command1_Click()
Dim stext As String
Dim wide As Long, xposition As Long
Me.ScaleMode = vbPixels
Me.Width = Screen.Width * 0.95
With Picture1
.BorderStyle = vbFixedSingle
.AutoRedraw = True
.ScaleMode = vbPixels
.FontName = "Times New Roman"
.FontSize = 16
.FontBold = True
.Cls
stext = "Rum and Coke® is a wonderful drink - but it needs "
stext = stext & "to be dark rum and definitely not diet Coke®."
.Move 0, 10, .TextWidth(stext), .TextHeight(stext) + 6
stext = stext & Space$(12)
End With
Do
wide = Picture1.TextWidth(Left$(stext, 1))
For xposition = 0 To 1 - wide Step -1
Picture1.Cls
Picture1.CurrentX = xposition
Picture1.Print stext;
objDD.WaitForVerticalBlank DDWAITVB_BLOCKBEGIN, ByVal 0
DoEvents
Next xposition
stext = Mid$(stext, 2) + Left$(stext, 1)
Loop
End Sub
.
- Follow-Ups:
- Re: Scrolling text in a stationary label help needed
- From: Mike Williams
- Re: Scrolling text in a stationary label help needed
- References:
- Scrolling text in a stationary label help needed
- From: jcrouse1
- Re: Scrolling text in a stationary label help needed
- From: Dmitriy Antonov
- Re: Scrolling text in a stationary label help needed
- From: jcrouse1
- Re: Scrolling text in a stationary label help needed
- From: Dmitriy Antonov
- Scrolling text in a stationary label help needed
- Prev by Date: Re: simple textbox label question
- Next by Date: Re: To write to a file at a specific position
- Previous by thread: Re: Scrolling text in a stationary label help needed
- Next by thread: Re: Scrolling text in a stationary label help needed
- Index(es):
Relevant Pages
|