>John & Rod:
>
>I found my problem! In my Expand method I was traversing the Child nodes incorrectly. I recompiled my code under VFP6 and it failed every single time, not just 20%. This made it much easier to pinpoint the problem. In VFP5, I was probably clobbering memory someplace else and was probably setting my self for a future GPF someplace down the road. It SEEMED like it was working, but it was not. Don't you just hate things working, but for the wrong reason? Oh, well, thanks again guys. Still have the other two questions...NODEFAULT and prevent collapse.
>
Here's what it says in CtrlRef.hlp for the TreeView.Expand event:
Private Sub TreeView1_Expand(ByVal Node As Node)
If Node.Index <> 1 Then
Node.Expanded = False ' Prevent expand.
End If
End Sub
So, in the event where unneeded expansion occurs, you can simply say oTreeViewNodes[lnMyNodeNo].Expanded=.f.; the tricky part is finding the exact method which executes. Maybe it's just the TreeView.Expand method. You could issue a NoDefault when you... what do you mean, NoDefault doesn't work? I didn't seem to have a problem with _that_ (aside from others I _did_ have).