|
-
Nov 18th, 2009, 08:42 AM
#1
Thread Starter
Fanatic Member
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
-
Nov 18th, 2009, 08:44 AM
#2
Re: Caption effects of a form
What kind of effects are you looking for? Please be more specific.
-
Nov 18th, 2009, 09:45 AM
#3
Thread Starter
Fanatic Member
Re: Caption effects of a form
 Originally Posted by RhinoBull
What kind of effects are you looking for? Please be more specific.
let it be blinking, typing means any effetct. plz help
-
Nov 18th, 2009, 11:02 AM
#4
Member
Re: Caption effects of a form
-
Nov 18th, 2009, 11:02 AM
#5
Member
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
-
Nov 18th, 2009, 11:16 AM
#6
Thread Starter
Fanatic Member
Re: Caption effects of a form
 Originally Posted by h2so4
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
-
Nov 18th, 2009, 11:30 AM
#7
Member
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
-
Nov 18th, 2009, 11:44 AM
#8
Thread Starter
Fanatic Member
Re: Caption effects of a form
 Originally Posted by h2so4
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
-
Nov 18th, 2009, 11:47 AM
#9
Member
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)
-
Nov 18th, 2009, 11:56 AM
#10
Thread Starter
Fanatic Member
Re: Caption effects of a form
 Originally Posted by h2so4
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
-
Nov 18th, 2009, 12:03 PM
#11
Member
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
-
Nov 18th, 2009, 12:15 PM
#12
Thread Starter
Fanatic Member
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
-
Nov 18th, 2009, 12:21 PM
#13
Member
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)
-
Nov 18th, 2009, 12:43 PM
#14
Thread Starter
Fanatic Member
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 ...
-
Nov 18th, 2009, 01:24 PM
#15
Member
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
-
Nov 18th, 2009, 10:15 PM
#16
Thread Starter
Fanatic Member
Re: Caption effects of a form
 Originally Posted by h2so4
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
-
Nov 19th, 2009, 08:24 AM
#17
Re: Caption effects of a form
 Originally Posted by janu
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|