Haven't got an ide in front of me to check but you could presumably just remove it:-I don't know of a way to cancel the control creation
By the way, I think there's a typo in your code:-Code:f.Controls.Remove(Me)
Should be:-Code:Dim c = f
Unless you actually want to check the control isn't the form for some reasonCode:Dim c = f.GetNextControl(c, True)
edit> crossed over
You may or may not want this:-
While that's in they could add a second control to the form at run time.If Me.DesignMode
Not quite. The "On" methods fire the events and are the intended method for firing the event from code, rather than calling the handling event directly. The correct way to wire up an event handler is the first one.is the same thing?




Reply With Quote
