A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Inserting a User Control in PowerPoint



 
 
Thread Tools Display Modes
  #1  
Old June 22nd, 2004, 11:52 PM
Aaron
external usenet poster
 
Posts: n/a
Default Inserting a User Control in PowerPoint

Within the .NET framework I've created a class that derives from System.Windows.Forms.UserControl. I override the OnPaint() method to draw a text string on the control surface and implement ComRegisterFunctionAttribute() so that this control can be registered as COM control. I then start PowerPoint 2003 and insert this control onto a slide. When I select "ViewSlide Show" I see the control on the slide. If I select the control with the mouse the whole slide starts to refresh (including the navigator buttons in left bottom corner of the presentation) and the CPU usage reaches 100%.

If I override the WndProc() method of this UserControl and block the WM_SETFOCUS (0x07) message, the problem will disappear and everything works fine, however, if I put another control (any control that can receive focus; like a button) onto the UserControl, and select the control duringduring the slide show, the constant refreshing behavior starts again.

I don't want to have to create a customized control for every user control I use and I' concerned about the side effects of blocking the WM_SETFOCUS message. Is there another solution to this issue?
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.