PC Review


Reply
Thread Tools Rate Thread

Creative graphics

 
 
Doc
Guest
Posts: n/a
 
      22nd Oct 2009
Good Evening Y'all,

My problem is trivial. I am submitting it with the hope of learning some
coding techniques.

I have a WordArt object on a worksheet. When the object is made visible,
its transparency is 0%. I keep it in view for 10 seconds and then would
like the background to appear to fade away with the text unchanged. The
problem is that the fading is not smooth. Each transparency change,
regardless of how much (in my case 10%), remains visible for approximately 1
second before changing again until the transparency is at 100% when I hide
the object.

Is there any way of changing my code to make the transparency changes smooth
? I suspect the 1 second delay is the time Excel requires to refresh the
WordArt object on the display. While on the subject, what is the code, if
any, to fade the text only and leave the background unchanged ? I could
only find code to change the font name, size, bold or italics.

The macro recorder did not even recognize selecting the WordArt object.
Google and Bing helped with the background transparency but not the text
transparency.

Here is my code snippet:

Dim ViewReminder As Shape
Dim Start As Double, Dimmer As Double
Set ViewReminder = ActiveSheet.Shapes("ScreenMessageBox")
With ViewReminder
.Fill.Transparency = 0
.Visible = True
End With
Start = Timer
Do While Timer < Start + 10
DoEvents
Loop
' Begin fade
For Dimmer = 0 To 1 Step 0.1
ViewReminder.Fill.Transparency = Dimmer ' <--- Each change is visible
'
for about 1 second
DoEvents
Next Dimmer
With ViewReminder
.Visible = False
.Fill.Transparency = 0
End With

Thank you to all interested.

Doc

 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      22nd Oct 2009
You can do something like this on the shape


myshape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)

For i = 0 To 200 Step 5 'Can go to 255
Debug.Print i
myshape.TextFrame.TextRange.Font.Color.RGB = RGB(i, i, i)
Next i


"Doc" wrote:

> Good Evening Y'all,
>
> My problem is trivial. I am submitting it with the hope of learning some
> coding techniques.
>
> I have a WordArt object on a worksheet. When the object is made visible,
> its transparency is 0%. I keep it in view for 10 seconds and then would
> like the background to appear to fade away with the text unchanged. The
> problem is that the fading is not smooth. Each transparency change,
> regardless of how much (in my case 10%), remains visible for approximately 1
> second before changing again until the transparency is at 100% when I hide
> the object.
>
> Is there any way of changing my code to make the transparency changes smooth
> ? I suspect the 1 second delay is the time Excel requires to refresh the
> WordArt object on the display. While on the subject, what is the code, if
> any, to fade the text only and leave the background unchanged ? I could
> only find code to change the font name, size, bold or italics.
>
> The macro recorder did not even recognize selecting the WordArt object.
> Google and Bing helped with the background transparency but not the text
> transparency.
>
> Here is my code snippet:
>
> Dim ViewReminder As Shape
> Dim Start As Double, Dimmer As Double
> Set ViewReminder = ActiveSheet.Shapes("ScreenMessageBox")
> With ViewReminder
> .Fill.Transparency = 0
> .Visible = True
> End With
> Start = Timer
> Do While Timer < Start + 10
> DoEvents
> Loop
> ' Begin fade
> For Dimmer = 0 To 1 Step 0.1
> ViewReminder.Fill.Transparency = Dimmer ' <--- Each change is visible
> '
> for about 1 second
> DoEvents
> Next Dimmer
> With ViewReminder
> .Visible = False
> .Fill.Transparency = 0
> End With
>
> Thank you to all interested.
>
> Doc
>

 
Reply With Quote
 
Doc
Guest
Posts: n/a
 
      22nd Oct 2009
Barb,

Thank you for the immediate reply.
The line
myshape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
caused an error 438: Object doesn't support this Property or Method.
Your suggestion caused me to relook at the font transparency issue.
Why I found it now and not yesterday is ..... sleep deprivation, that's it.

The font transparency code is
myshape.TextFrame2.TextRange.Font.Fill.Transparency = 0.8 ' 0 to 1

When placed in my code, the font transparency change is the same as the
background.
It takes about 1 second for each change.

I got your routine to work. It will change the color of the text from black
to white but not the transparency. Interestingly, the font color change
(like you suggested) is smooth. I did need to add a 'DoEvents after setting
the RGB color.

This is what I have found:
myshape.Fill.Transparency = # (# is 0 to 1) ' Changes background
transparency
myshape.TextFrame2.TextRange.Font.Fill.Transparency = # (# is 0 to 1) '
Changes font transparency
myshape.TextFrame2.TextRange.Font.Fill.ForeColor.RGB = RGB(#, #, #) ' (#
is 0 to 255) Changes font color

I appreciate your suggestion. It has lead to determining the code to change
the font transparency. My desire to make the transparency changes smooth is
purely for aesthetics. I'm sure I will go on to live another day if I don't
solve it.

Thanks again.

Doc

"Barb Reinhardt" <(E-Mail Removed)> wrote in message
news:8D92FB5E-5CB8-4276-BE1D-(E-Mail Removed)...
> You can do something like this on the shape
>
>
> myshape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
>
> For i = 0 To 200 Step 5 'Can go to 255
> Debug.Print i
> myshape.TextFrame.TextRange.Font.Color.RGB = RGB(i, i, i)
> Next i
>
>
> "Doc" wrote:
>
>> Good Evening Y'all,
>>
>> My problem is trivial. I am submitting it with the hope of learning some
>> coding techniques.
>>
>> I have a WordArt object on a worksheet. When the object is made visible,
>> its transparency is 0%. I keep it in view for 10 seconds and then would
>> like the background to appear to fade away with the text unchanged. The
>> problem is that the fading is not smooth. Each transparency change,
>> regardless of how much (in my case 10%), remains visible for
>> approximately 1
>> second before changing again until the transparency is at 100% when I
>> hide
>> the object.
>>
>> Is there any way of changing my code to make the transparency changes
>> smooth
>> ? I suspect the 1 second delay is the time Excel requires to refresh the
>> WordArt object on the display. While on the subject, what is the code,
>> if
>> any, to fade the text only and leave the background unchanged ? I could
>> only find code to change the font name, size, bold or italics.
>>
>> The macro recorder did not even recognize selecting the WordArt object.
>> Google and Bing helped with the background transparency but not the text
>> transparency.
>>
>> Here is my code snippet:
>>
>> Dim ViewReminder As Shape
>> Dim Start As Double, Dimmer As Double
>> Set ViewReminder = ActiveSheet.Shapes("ScreenMessageBox")
>> With ViewReminder
>> .Fill.Transparency = 0
>> .Visible = True
>> End With
>> Start = Timer
>> Do While Timer < Start + 10
>> DoEvents
>> Loop
>> ' Begin fade
>> For Dimmer = 0 To 1 Step 0.1
>> ViewReminder.Fill.Transparency = Dimmer ' <--- Each change is visible
>> '
>> for about 1 second
>> DoEvents
>> Next Dimmer
>> With ViewReminder
>> .Visible = False
>> .Fill.Transparency = 0
>> End With
>>
>> Thank you to all interested.
>>
>> Doc
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am upset at Creative Technology cuz they no longer make Creative Music Synth [220]. Radium Windows XP Music 4 19th Feb 2007 02:05 AM
My Creative Sound Blaster X-FI Sound Card Works Now with Creative's RC1 Device Driver's! I Have Sound! Kevin John Panzke Windows Vista General Discussion 1 14th Oct 2006 11:36 AM
Well for all you creative haters ---- creative not doing so well it seems JohnS@hawaii.rr.com Computer Hardware 7 6th May 2006 06:32 PM
CorelDraw Graphics Suite 12 [3 CDs], ADOBE CREATIVE SUITE PREMIUM INTERNAL [5 CDs] (WIN/MAC), te2 Printers 1 29th Aug 2004 07:44 PM
CorelDraw Graphics Suite 12 [3 CDs], ADOBE CREATIVE SUITE PREMIUM INTERNAL [5 CDs] (WIN/MAC), Adobe InDesign CS PageMaker Edition (c) Adobe Systems [2 CDs], Addons, Plugins, - new ! te2 Scanners 0 29th Aug 2004 06:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 PM.