I'm trying to get an event when a usercontrol is moved on another, not only resized but moved. I don't want to use timers.
Also what's this:
UserControl.Ambient
Any help appreciated
Printable View
I'm trying to get an event when a usercontrol is moved on another, not only resized but moved. I don't want to use timers.
Also what's this:
UserControl.Ambient
Any help appreciated
You mean at design time, ouch, as a guess you could include a form in cour controll,then use setparent to move it into the controll, then subclass this form and catch it's WM_WINDOWPOSITIONCHANGING message, that should work, unfortunatly VB does some stuff to trap windows messages at design time, but a form can get around this. I don't know if it'll work but it might.
The Ambient lets you get at some of the properties set by the user, for example usercontrol.Ambient.DisplayName gives you the name the user has set for your controll, for example If you have a Control MyControl then usercontrol.Ambient.DisplayName could be MyControl1, or MyControl2 etc. usercontrol.Ambient.Usermode can tell if a control's at runtime or designtime
Just experiment
ok, i found out everything about ambient. There's a property for not showing the handles. But it's readonly?!?!?
How do i make the control not movable at all in design time, just by code?