Results 1 to 3 of 3

Thread: User controls rocks again

  1. #1

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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

  3. #3

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width