Scrolling Text on the Title Bar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mohan Krishna
    New Member
    • Oct 2007
    • 115

    Scrolling Text on the Title Bar

    Hi everyone!

    Can we get the text scrolled on the title bar of the VB Project Form? The text may be the name of the company to which I am developing the project.

    Please give me answer asap!

    ThanQ u!
  • lotus18
    Contributor
    • Nov 2007
    • 865

    #2
    Try using a timer for scrolling of text

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Use the name of the company in the caption property of the form. Pad enough spaces to the left side initially and gradually keep on decreasing the spaces. Once you reach the extreme left again pad to full size.
      Last edited by Killer42; Nov 13 '07, 06:47 AM.

      Comment

      • Mohan Krishna
        New Member
        • Oct 2007
        • 115

        #4
        Originally posted by lotus18
        Try using a timer for scrolling of text

        Hi

        Thank you for your reply.

        Can you please help me with the code?

        I tried and am not getting that.

        timer time = 100

        [code=vb]
        Option Explicit
        Dim i As Integer
        Private Sub Form_Load()
        Me.Caption = "Kashyap Kavya"
        i = 0
        End Sub

        Private Sub Timer1_Timer()
        If Len(Me.Caption) <> 0 Then
        Me.Caption = Mid(Me.Caption, i)
        i = i + 1
        Else
        Me.Caption = "Kashyap Kavya"
        i = 0
        End If
        End Sub
        [/code]
        Last edited by Killer42; Nov 13 '07, 06:48 AM.

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Try this sample code.

          Set the timer interval to 100

          [code=vb]
          Dim Str As String

          Private Sub Form_Load()
          Str = " Debasis" ' (That's 161 spaces)
          End Sub

          Private Sub Timer1_Timer()
          If Len(Str) > 10 Then
          Str = Right(Str, Len(Str) - 1)
          Me.Caption = Str
          Else
          Str = " Debasis"
          End If
          End Sub[/code]
          Hope that solves your problem.
          Last edited by Killer42; Nov 13 '07, 06:51 AM.

          Comment

          • Mohan Krishna
            New Member
            • Oct 2007
            • 115

            #6
            Originally posted by debasisdas
            Try this sample code.

            Set the timer interval to 100
            :
            :
            :
            Hope that solves your problem.
            Thank You Very much Sir!

            Then if the screen size increase how to change the spaces. May I use the Form width. I'll also try Sir.

            Comment

            Working...