Re: Problems with VB6 activex in PowerPoint
- From: "Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Jul 2005 07:51:29 -0700
"Jerry" <jvelders@xxxxxxxxxxxxxx> wrote in message
news:11da877hutob04@xxxxxxxxxxxxxxxxxxxxx
>
> 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 to log the control's height
> and
> width, and when it fails, it generates over 140 calls to resize,
> renegotiating the size downward until it either crashes or reaches an
> 'acceptable' size .. Presumably this renegotiation is recursive, and
> causes
> an out-of-memory condition.
I don't have powerpoint here to try anything but.....
Preventing recursion is fairly easy. For example, this recurses to the point
of no return....
'=================
Private Sub Form_Resize()
Debug.Print "'Form1:Form_Resize", Timer
Me.Width = Me.Width - 15
End Sub
'=================
Adding a simple static flag gets rid of the problem. You'll see the
Debug.Print line only once (until you resize again)
'=================
Private Sub Form_Resize()
Static bAlreadyHere As Boolean
If Not bAlreadyHere Then
bAlreadyHere = True
Debug.Print "'Form1:Form_Resize", Timer
Me.Width = Me.Width - 15
bAlreadyHere = False
End If
End Sub
'=================
--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
.
- Follow-Ups:
- Re: Problems with VB6 activex in PowerPoint
- From: Jerry
- Re: Problems with VB6 activex in PowerPoint
- References:
- Problems with VB6 activex in PowerPoint
- From: Jerry
- Problems with VB6 activex in PowerPoint
- Prev by Date: Problems with VB6 activex in PowerPoint
- Next by Date: Re: Problems with VB6 activex in PowerPoint
- Previous by thread: Problems with VB6 activex in PowerPoint
- Next by thread: Re: Problems with VB6 activex in PowerPoint
- Index(es):
Relevant Pages
|
Loading