how do we create an effects for caption of a form.
I mean Text effect on title bar.
thanks in advance
Printable View
how do we create an effects for caption of a form.
I mean Text effect on title bar.
thanks in advance
What kind of effects are you looking for? Please be more specific.
Sory, look behind
Some effects:
Use a timer to Put and Remove Spaces before a caption, it´s apears like Moving
OrCode:Hi
Hi
Hi
Hi
Hi
Hi
Hi
Use a timer to chage caption between your caprtion and " " will be like blinking
Create a new form...
Put a Timer with interval 100ms
BlinkingCode: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
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
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 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
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
To "typing words and then blinking" just change the same 2 things that other time.
Quote:
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)
brother, i do not want both the effects should go simanustaniously . i want when typing words are finshed and then blinking ...
Create other Flag (boolean) like DirectionToRight, that control what should done.
eg
If True then
Type Effect
Else
Blink Effect
End If
Wow! :rolleyes:
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.