Greetings!
In doing some research, I've learned that some other people have had
problems with Me.DesignMode not working correctly when it's used in a
user control that is placed on another form. There was a suggestion...
Protected Shadows ReadOnly Property DesignMode() As Boolean
Get
If (MyBase.DesignM ode) Then
Return True
Else
Dim parent As Control = Me.Parent
While Not (parent) Is Nothing
Dim site As ISite = parent.Site
If Not (site) Is Nothing AndAlso
site.DesignMode Then
Return True
End If
parent = parent.Parent
End While
Return False
End If
End Get
End Property
....but this suggestion does not work effectively. Does anyone know of
another way and/or a supplement to this recursive function that I am
not seeing? I've heard that you can use GetCurrentProce ss, but that
didn't seem to work for me.
Thanks,
Kyjan