Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: How does an OCX refer to an instance of itself on form to resize?


Message #1 by "Ron Howerton" <ron.howerton@s...> on Mon, 17 Dec 2001 17:22:39
One technique that I often use is to have the OCX do a RaiseEvent.  
The "host" form that the OCX is sitting on will need to have some code in 
the event handler for this new event.  Then, it places the responsibility 
for managing the positioning/sizing with the host form, although the OCX 
initiated the request.

I use this same technique (.RaiseEvent) to inform the host whenever my 
OCX/UserControl gets an unrecoverable error.  Otherwise, it just "hashes" 
out.

> This seems to me to be a common question, but I cannot find any help on 
it 
> anywhere:
> 
> I've coded an ActiveX control that I would like to automatically 
> reposition and size itself when shown on a form (sort of like the 
Common 

  Return to Index