Problem with VB6 activex control in PowerPoint

J

Jerry

I built an OCX using VB6 (SP6). It's pretty big and complex, but seemed to
be working fine. It is specifically targeted for use within PowerPoint. In
the final stages of testing, a problem was found. To try to find the
problem, I started simplifying the code ... and finally ended up with a
completely empty OCX (no properties, no code whatsoever) which still
exhibits the problem.

The problem is that the control has a custom properties sheet. Within the
PowerPoint design environment, right-clicking the control brings up a
context menu that has an entry for 'Properties' and one for 'MyControl
Object | Properties'. If you select 'MyControl Object | Properties', the
custom propsheet appears, and after it is dismissed, PowerPoint is unable to
resize the control. On PowerPoint 2002 SP1, the attempt to resize the
control simply fails. On PowerPoint 2002 SP3, PowerPoint crashes when you
attempt to resize the control.

These problems do NOT happen if you select 'Properties' from the context
menu (which brings up the powerpoint properties browswer) and then click
'Custom' to bring up the custom props sheet.

Bear in mind that this happens even with a bare-bones, no-code VB6 activex
control. I built this little test control by creating a new activex, adding
one blank property sheet and connecting it to the control. Not even one
line of code was added.

I can't figure out where the problem lies. Since my test ocx has no
user-written code, it can't be a bug I've created. However, I've tested
this in other containers (VB form, MFC dialog, Excel and Word) and it does
not occur. On the other hand, I've tried a variety of other activex
controls in PowerPoint, and none of them display the problem.

I'm at my wits end, and would appreciate any help or insight. Since it's
doubtful I'll get any direct help from MS, is it possible to disable the
'Properties' selection from the 'MyControl Object' entry on the context
menu? I've spent several days searching MSDN and the web looking for info,
and have not found anything.

In trying to find a way to disable the 'MyControl Object | Properties'
entry, I've found at least one activex control (Microsoft System Monitor
Control) which has a custom property sheet which does NOT appear in the
'object' menu ... so I know it can be done. Again let me reiterate that the
problem does not happen if the custom propsheet is invoked via 'Custom' on
the PowerPoint property browser .. only when invoked directly from the
'Object | Properties' menu selection.

I'd appreciate any insight from anyone. Thanks in advance.

Jerry
 
J

Jerry

As an addendum, I should note that I've read KB314441, and while the problem
is very similar, I do NOT have EditAtDesignTime enabled. Also, I placed a
couple of lines of code in the resize event, and when it fails, it generates
over 100 calls to resize, renegotiating the size downward until it either
crashes or reaches an 'acceptable' size ..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top