home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,995 of 10,840   
   The Mess to All   
   Peculiar Control Behaviour   
   21 Nov 04 22:09:03   
   
   From: email@none.com   
      
   Here's a simple example of my problem...   
   Create a new Activex Control and just put a ComboBox on it.   
   Add a project and site the new Control.   
      
   Add this to the Form code. and run it.   
      
   **********************************************   
      
   Option Explicit   
      
   Private Sub UserControl_Initialize()   
   MsgBox "Initialize"   
   Combo1.AddItem "Hello"   
   End Sub   
      
   Private Sub UserControl_InitProperties()   
   MsgBox "InitProperties"   
   End Sub   
      
   Private Sub UserControl_ReadProperties(PropBag As PropertyBag)   
   MsgBox "ReadProperties"   
   End Sub   
      
   Private Sub UserControl_Resize()   
   MsgBox "Resize"   
   End Sub   
   ************************************   
      
   I find it very curious that it does the Initialize event, then the Resize   
   event, then the ReadProperties event.   
      
   It seems that adding something to the ComboBox with AddNew does this.   
   When it's commented out it works like the docs say: Initialize event, then   
   the ReadProperties event, then the Resize event.   
      
   Am I not understanding something right, or is this not the right behaviour.   
   I guess the workaround must be to put this in the ReadProperties event?   
      
   I am using VB5, and have not made all that many controls.   
      
   Thanks for any help.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca