Hi Jeff,
As I have understood from your requirement, you want to open a new form when clicking on a
GroupViewItem not the groupBarItem as you have mentioned. The control present in the client area of a groupBarItem (group) is
GroupView which contains groupViewItems. You have to handle the
GroupViewItemSelected event and check for the selected item and write the code for creating a form as shown below
Private Sub GroupView1_GroupViewItemSelected(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupView1.GroupViewItemSelected
If (Me.GroupView1.SelectedItem = 0) Then
frm = New Form2()
frm.MdiParent = Me
frm.Show()
End If
End Sub
I have attached a VB 2005 sample. In the sample, if you click on the first groupViewItem (GroupViewItem0), it will open a new mdi form.
Please let me know if I have missed anything. Thanks for using Essential Tools.
Regards,
Mano
f44426_GroupBar.zip