PDA

View Full Version : Chữ chạy trên thanh Title của Form



ngocchung83
08-01-2010, 18:24
Chào mọi ngừoi.Cho em hỏi viết Code nhủ thế nào đê cái Caption của Form có thể chạy từ trái sang phải hay từ phải sang trái gì cũng đựoc.Mình xin cảm ơn

QuyNam
09-01-2010, 10:27
cần 1 timer, interval là 100

chạy từ trái --> phải


Private Sub Form_Load()
Me.Caption = "NHQN" 'dong chu muon chay
End Sub

Private Sub Timer1_Timer()
Me.Caption = " " & Me.Caption
If TextWidth(Me.Caption) > Me.ScaleWidth - 1000 Then Me.Caption = Trim(Me.Caption)
End Sub

kysudat
12-01-2010, 14:22
Private Sub Timer1_Timer()
Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1)
End Sub