VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Smoothly scrolls either text, graphics or controls across a form

by T-REX Software (14 Submissions)
Category: Graphics
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd March 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Smoothly scrolls either text, graphics or controls across a form

API Declarations



Dim thetop As Long
Dim p1hgt As Long
Dim p1wid As Long
Dim theleft As Long


Rate Smoothly scrolls either text, graphics or controls across a form



C.CurrentX = (C.ScaleWidth - C.TextWidth(Txt)) / 2
C.Print Txt
End Sub

'Sub Form_Load ()
p1.autoredraw = true
p1.visible = false
p1.FontSize = 12
p1.ForeColor = &HFF0000
p1.BackColor = BackColor
p1.ScaleMode = 3
centerIT p1, "Xtreme Software"
centerIT p1, "<< Master Add-In 3.0 >>"

ScaleMode = 3
theleft = (ScaleWidth - p1.TextWidth("Scroll Test...")) / 2
thetop = ScaleHeight
p1hgt = p1.ScaleHeight
p1wid = p1.ScaleWidth
timer1.Enabled = True
timer1.Interval = 10
'End Sub


'Sub Timer1_Timer ()
      X% = BitBlt(hDC, theleft, thetop, p1wid, p1hgt, p1.hDC, 0, 0, &HCC0020)
      thetop = thetop - 1
      If thetop < -p1hgt Then
      Timer1.Enabled = False
      Txt$ = "Finished With Scrolling"
      CurrentY = ScaleHeight / 2
      CurrentX = (ScaleWidth - TextWidth(Txt$)) / 2
      Print Txt$
   End If
'End Sub

Download this snippet    Add to My Saved Code

Smoothly scrolls either text, graphics or controls across a form Comments

No comments have been posted about Smoothly scrolls either text, graphics or controls across a form. Why not be the first to post a comment about Smoothly scrolls either text, graphics or controls across a form.

Post your comment

Subject:
Message:
0/1000 characters