Results 1 to 17 of 17

Thread: Caption effects of a form

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Caption effects of a form

    how do we create an effects for caption of a form.

    I mean Text effect on title bar.

    thanks in advance

  2. #2

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    Quote Originally Posted by RhinoBull View Post
    What kind of effects are you looking for? Please be more specific.
    let it be blinking, typing means any effetct. plz help

  4. #4
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    Sory, look behind

  5. #5
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    Some effects:

    Use a timer to Put and Remove Spaces before a caption, it´s apears like Moving
    Code:
    Hi
      Hi
        Hi
          Hi
        Hi
      Hi
    Hi
    Or

    Use a timer to chage caption between your caprtion and " " will be like blinking

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    Quote Originally Posted by h2so4 View Post
    Some effects:

    Use a timer to Put and Remove Spaces before a caption, it´s apears like Moving
    Code:
    Hi
      Hi
        Hi
          Hi
        Hi
      Hi
    Hi
    Or

    Use a timer to chage caption between your caprtion and " " will be like blinking

    will you plz give me the brief code
    how this will be achived

  7. #7
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    Create a new form...
    Put a Timer with interval 100ms

    Code:
    Option Explicit
    
    Dim CaptionSpaces As Integer
    Dim OriginalCaption As String
    Dim DirectionToRight As Boolean
    
    Private Sub Form_Load()
    OriginalCaption = "Hello, I'm Moving"
    CaptionSpaces = 1
    DirectionToRight = True
    End Sub
    
    Private Sub Timer1_Timer()
    If DirectionToRight Then
        ' Move to right
        CaptionSpaces = CaptionSpaces + 1
    Else
        ' Move back to Left
        CaptionSpaces = CaptionSpaces - 1
    End If
    
    ' invert direction
    If CaptionSpaces < 1 Then DirectionToRight = True
    If CaptionSpaces > 50 Then DirectionToRight = False
    
    ' Put the caption
    Me.Caption = Space(CaptionSpaces) & OriginalCaption
    
    End Sub
    Blinking

    Code:
    Option Explicit
    
    Dim OriginalCaption As String
    Dim Blink As Boolean
    
    Private Sub Form_Load()
    OriginalCaption = "Hello, I'm Blinking"
    Blink = True
    End Sub
    
    Private Sub Timer1_Timer()
    If Blink Then
        Blink = False
        Me.Caption = ""
    Else
        Blink = True
        Me.Caption = OriginalCaption
    End If
    
    End Sub
    Last edited by h2so4; Nov 18th, 2009 at 11:39 AM. Reason: Add code to blink

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    Quote Originally Posted by h2so4 View Post
    Create a new form...
    Put a Timer with interval 100ms

    Code:
    Option Explicit
    
    Dim CaptionSpaces As Integer
    Dim OriginalCaption As String
    Dim DirectionToRight As Boolean
    
    Private Sub Form_Load()
    OriginalCaption = "Hello, I'm Moving"
    CaptionSpaces = 1
    DirectionToRight = True
    End Sub
    
    Private Sub Timer1_Timer()
    If DirectionToRight Then
        ' Move to right
        CaptionSpaces = CaptionSpaces + 1
    Else
        ' Move back to Left
        CaptionSpaces = CaptionSpaces - 1
    End If
    
    ' invert direction
    If CaptionSpaces < 1 Then DirectionToRight = True
    If CaptionSpaces > 50 Then DirectionToRight = False
    
    ' Put the caption
    Me.Caption = Space(CaptionSpaces) & OriginalCaption
    
    End Sub
    Blinking

    Code:
    Option Explicit
    
    Dim OriginalCaption As String
    Dim Blink As Boolean
    
    Private Sub Form_Load()
    OriginalCaption = "Hello, I'm Blinking"
    Blink = True
    End Sub
    
    Private Sub Timer1_Timer()
    If Blink Then
        Blink = False
        Me.Caption = ""
    Else
        Blink = True
        Me.Caption = OriginalCaption
    End If
    
    End Sub
    Thank you very much you are great.. little more


    what about blinking and effect like typing words

  9. #9
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    For effect like typing try use the funcion left.


    At first 'code'
    On
    If CaptionSpaces > 50 Then
    Put
    If CaptionSpaces > Len(OriginalCaption) Then

    AND

    on
    Me.Caption = Space(CaptionSpaces) & OriginalCaption
    put
    Me.Caption = Left(OriginalCaption, CaptionSpaces)

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    Quote Originally Posted by h2so4 View Post
    For effect like typing try use the funcion left.


    At first 'code'
    On
    If CaptionSpaces > 50 Then
    Put
    If CaptionSpaces > Len(OriginalCaption) Then

    AND

    on
    Me.Caption = Space(CaptionSpaces) & OriginalCaption
    put
    Me.Caption = Left(OriginalCaption, CaptionSpaces)
    if this code would habeen also like the two you gave before for moving and blinking. thanks in advance

  11. #11
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    If I understood, you want to MOVE AND BLINK, right?

    Code:
    Option Explicit
    
    Dim CaptionSpaces As Integer
    Dim OriginalCaption As String
    Dim DirectionToRight As Boolean
    
    Private Sub Form_Load()
    OriginalCaption = "Hello, I'm Moving"
    CaptionSpaces = 1
    DirectionToRight = True
    End Sub
    
    Private Sub Timer1_Timer()
    If DirectionToRight Then
        ' Move to right
        CaptionSpaces = CaptionSpaces + 1
    Else
        ' Move back to Left
        CaptionSpaces = CaptionSpaces - 1
    End If
    
    ' invert direction
    If CaptionSpaces < 1 Then DirectionToRight = True
    If CaptionSpaces > 50 Then DirectionToRight = False
    
    ' Put the caption; Now Move AND Blink
    if CaptionSpaces mod 2 = 0 then ' When Pair, show, else Hide.
       Me.Caption = Space(CaptionSpaces) & OriginalCaption
    else
       Me.Caption = ""
    end if
    
    End Sub

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    thank you very much . my actual aim is

    typing words and then blinking , but also thanks for blinking while moving.

    hope i will be help foe what i want

  13. #13
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    To "typing words and then blinking" just change the same 2 things that other time.

    At first 'code'
    On
    If CaptionSpaces > 50 Then
    Put
    If CaptionSpaces > Len(OriginalCaption) Then

    AND

    on
    Me.Caption = Space(CaptionSpaces) & OriginalCaption
    put
    Me.Caption = Left(OriginalCaption, CaptionSpaces)

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    brother, i do not want both the effects should go simanustaniously . i want when typing words are finshed and then blinking ...

  15. #15
    Member
    Join Date
    Jul 2009
    Posts
    33

    Re: Caption effects of a form

    Create other Flag (boolean) like DirectionToRight, that control what should done.
    eg
    If True then
    Type Effect
    Else
    Blink Effect
    End If

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: Caption effects of a form

    Quote Originally Posted by h2so4 View Post
    Create other Flag (boolean) like DirectionToRight, that control what should done.
    eg
    If True then
    Type Effect
    Else
    Blink Effect
    End If
    once again a request for complete code for particular desired effect. hope i get it as previous. thanks

  17. #17
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Caption effects of a form

    Quote Originally Posted by janu View Post
    once again a request for complete code for particular desired effect. hope i get it as previous. thanks
    Wow!
    You cannot "request" - you may only "ask" for a help and patiently wait (and hope too) when someone is willing to answer your question(s).
    Remember - all of us here are volunteers.

    Besides, you need to show a bit of an effort on your end as well. So far I didn't see any.

    Sorry and best regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width