Private Sub SetPreviewControl(ByVal c As Control)
With pnlControlContainer.Controls
.Clear()
.Add(c)
End With
Me.PropertyGrid1.SelectedObject = c
End Sub</pre></div><p>如此簡易的User Control Test Container就完成了。</p><p> </p><p>這邊附上我寫好的範例程式,主要介面仿照User Test Container。除提供User Test Container的功能外,另加上語系切換,與預覽表單的功能。程式介面外觀如下:</p><p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" width="602" height="522" src="\images\posts\13810\image_thumb.png" /></a></p><p> </p> <h2>Download</h2><p><a href="http://Files.Dotblogs.com.tw/larrynung/1002/2010227232727262.zip">User Control Test Container.zip</p>