Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / April 2008

Tip: Looking for answers? Try searching our database.

Toolbar-Buttons with colors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
George - 31 Mar 2008 05:33 GMT
Hi

I have to rebuild an existing add-in (.ppa), which creates
a toolbar that helps to assign a certain color to an element
on a slide.

Each button of this existing add-in shows the (RGB-)
color on it. How is this done? There are no additional
grafics; the add-in is a stand-alone solution.

Has somebody an idea, how I can create such a tool-
bar with "RGB-colored" buttons?

PS: Only the coloring of the buttons is my problem, not
the code which runs when they are activated.

Thanks for any help. Maybe a .ppa can be reconverted
to a .ppt?

Best Regards, George
Chirag - 31 Mar 2008 16:20 GMT
Hi George,

The CommandBarButton object has a Picture property that is an IPictureDisp.
You can use any Image object on a UserForm and get its Picture to assign to
this Picture property of CommandBarButton.

You also get the Windows GDI Handle to this Picture property of
CommandBarButton. That is useful with Windows API to draw stuff on.

- Chirag

 PowerShow - View multiple PowerPoint slide shows simultaneously
 http://officeone.mvps.org/powershow/powershow.html

> Hi
>
[quoted text clipped - 15 lines]
>
> Best Regards, George
Steve Rindsberg - 31 Mar 2008 21:09 GMT
> Has somebody an idea, how I can create such a tool-
> bar with "RGB-colored" buttons?

Open a new presentation with no window (so it's not visible)
Add a slide to it
On the slide, add a rectangle and give it the RGB fill color you want, no
outline
Copy it
Use .PasteFace to paste the image from the clipboard to your button face

Repeat as needed, then close the invisible presentation

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
George - 01 Apr 2008 13:52 GMT
Dear Steve

Many Thanks. Build on your recommendations I was able
to build a toolbar as given before.

One last thing. When I Start with ...

---------------
Presentations.Add WithWindow:=msoFalse
ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutBlank).SlideID
---------------

... a new slide is added to the open, allready existing presentation and
when I close the "ActivePresentation", the Active Windows closes (not
the invisible presentation).

I think, I do someting wrong when opening a slide in the invisible
presentation
and closing this presentation again in the end. Can you help? Thanks a lot.

Best Regards, George

>> Has somebody an idea, how I can create such a tool-
>> bar with "RGB-colored" buttons?
[quoted text clipped - 13 lines]
> PPTools:  www.pptools.com
> ================================================
Chirag - 01 Apr 2008 14:10 GMT
Look at the following link:
http://officeone.mvps.org/vba/setbuttoncolor.html

- Chirag

 PowerShow - View multiple PowerPoint slide shows simultaneously
 http://officeone.mvps.org/powershow/powershow.html

> Dear Steve
>
[quoted text clipped - 36 lines]
>> PPTools:  www.pptools.com
>> ================================================
Steve Rindsberg - 01 Apr 2008 20:34 GMT
> Look at the following link:
> http://officeone.mvps.org/vba/setbuttoncolor.html

Nice one, Chirag

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Steve Rindsberg - 01 Apr 2008 20:34 GMT
> Dear Steve
>
[quoted text clipped - 15 lines]
> presentation
> and closing this presentation again in the end. Can you help? Thanks a lot.

I'd do it this way instead:

Dim oPres as Presentation
Set oPres = Presentations.Add WithWindow:=msoFalse
oPres.Slides.Add (etc ... just as you're doing now)

then when you're done:

oPres.Close

> Best Regards, George
>
[quoted text clipped - 15 lines]
> > PPTools:  www.pptools.com
> > ================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.