Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake an ActiveX control that fills its parent form when the form resizes
KeywordsActiveX control, resize, parent
CategoriesActiveX, ActiveX Controls, Controls
 
Declare a Form variable WithEvents. In the control's ReadProperties event handler, set this form to the parent form so the program can watch for its Resize events.
 
Private Sub UserControl_ReadProperties(PropBag As _
    PropertyBag)
    If Ambient.UserMode Then
        Set ParentForm = UserControl.Parent
    End If
End Sub
 
In the parent's Resize event handler, use the Extender to resize the control.
 
Private Sub ParentForm_Resize()
    Extender.Move 0, 0, ParentForm.ScaleWidth, _
        ParentForm.ScaleHeight
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated