private void btnDispatch_Click(object sender, EventArgs e)
 {
     DockContent frm = new TypedObjectViewer(m_objName, m_pObject, COMUtilities.GetDispatchTypeInfo(m_pObject)); ;
     if ((frm != null) && !frm.IsDisposed)
     {
         frm.ShowHint = DockState.Document;
         frm.Show(this.DockPanel);
     }
 }
        private void OpenObject(ListView lv)
        {
            if (lv.SelectedItems.Count > 0)
            {
                ListViewItem item = lv.SelectedItems[0];
                if (item.Tag is PropertyInfo)
                {
                    PropertyInfo pi = (PropertyInfo)item.Tag;
                    object val = null;

                    try
                    {
                        if (pi.CanRead)
                        {
                            val = pi.GetValue(m_pObject, null);
                        }
                    }
                    catch (Exception ex)
                    {
                        System.Diagnostics.Debug.WriteLine(ex.ToString());
                        val = null;
                    }

                    if (val != null)
                    {
                        TypedObjectViewer view = new TypedObjectViewer(m_objName, val, pi.PropertyType);
                        view.ShowHint = DockState.Document;
                        view.Show(this.DockPanel);
                    }
                }
            }
        }