title: How to create a Setter/Getter of UserControl in VB6?
body: <p>For an unknown reason, VB6 doesn't interact the same way with UserControl than other object.</p>
  
  <p>I have a class that require to hold a graphical interface, a user control and need to be set to be later used from the get method. I have try many thing like using the special class VBControlExtender but without any success.</p>
  
  <p>Here is what I have so far:</p>
  
  <h3>Class that hold variables and the user control:</h3>
  
  <pre><code>'...
  Private WithEvents m_uGUI As VBControlExtender
  
  Public Property Get GUI() As VBControlExtender
      Set GUI = m_uGUI
  End Property
  
  Public Property Set GUI(ByVal uValue As VBControlExtender)
      Set m_uGUI = uValue
  End Property
  '...
  </code></pre>
  
  <h3>Call of the class that cannot compile:</h3>
  
  <pre><code>Set myObject.GUI = new ucMyUserControl
  </code></pre>
  
  <p>Any idea?</p>