************************************************** *-- Class: marquee (c:\test\test.vcx) *-- ParentClass: form *-- BaseClass: form * DEFINE CLASS marquee AS form Top = 0 Left = 0 Height = 191 Width = 375 DoCreate = .T. Caption = "Marquee" ControlBox = .T. Name = "Form1" counter = .F. ADD OBJECT label1 AS label WITH ; FontSize = 28, ; Alignment = 1, ; Caption = "", ; Height = 61, ; Left = 24, ; Top = 72, ; Width = 325, ; Name = "Label1" ADD OBJECT text1 AS textbox WITH ; Height = 23, ; Left = 120, ; Top = 24, ; Width = 144, ; Name = "Text1" ADD OBJECT label2 AS label WITH ; AutoSize = .T., ; Caption = "Type your text:", ; Height = 17, ; Left = 36, ; Top = 24, ; Width = 78, ; Name = "Label2" ADD OBJECT command1 AS commandbutton WITH ; Top = 24, ; Left = 276, ; Height = 24, ; Width = 84, ; Caption = "Start", ; Default = .T., ; Name = "Command1" ADD OBJECT timer1 AS timer WITH ; Top = 156, ; Left = 252, ; Height = 23, ; Width = 23, ; Interval = 0, ; Name = "Timer1" PROCEDURE Load this.counter = 0 ENDPROC PROCEDURE command1.Click Local lcText lcText = Thisform.Text1.Value If Empty(lcText) Then messagebox("No data", 48, "Error") Thisform.Text1.Setfocus Return .f. Endif If This.Caption = "Start" Then Thisform.Timer1.Interval = 500 This.Caption = "Stop" Else Thisform.Timer1.Interval = 0 This.Caption = "Start" Thisform.Label1.Caption = "" Thisform.Text1.Setfocus Endif Thisform.Counter = 0 ENDPROC PROCEDURE timer1.Timer Local lcText lcText = Thisform.Text1.Value Thisform.Counter = Thisform.Counter + 1 Do Case Case Thisform.Counter <= Len(lcText) Thisform.Label1.Caption = Substr(lcText, 1, Thisform.Counter) Case Thisform.Counter < 40 Thisform.Label1.Caption = lcText + Space(Thisform.Counter - Len(lcText)) Otherwise Thisform.Counter = 0 EndCase ENDPROC ENDDEFINE * *-- EndDefine: marquee **************************************************Espero sea de ayuda.