Hi,

Please help me to create tool strip.

Can i use tools commonly for all the winforms?

how to create common toolstrip?

for example :

I have one toolstrip.it has one delete button.
All winform has one datagrid and data comes from differs tables.
Now i want to remove the data from the any datagrid all winforms.

can i do this..?

thanks in advance.


jack

Hopefully you have a Main (parent) form, where to place the tool strip, that you already set the IsMdiContainer property to True.
When you launch the additional forms from this one, you set the MdiParent property of the children form pointing to the Main form.

Dim F as new frmChildForm1
F.MdiParent = Me
F.Show

In each child form, you should add a Public sub or function that deletes the data related only to this child form.

Public Sub Delete
'
'    Delete whatever you need
'
End Sub

On the Main form, when the user clicks the tool strip 'Delete' button, you can cicle over the children forms

For Each ChildForm as Form In Me.Children
    
Next

Inside the loop you can place validations to determine wich one is the child form and call the Delete sub

If ChildForm Is frmChildForm1 Then
    Directcast(ChildForm, frmChildForm1).Delete
ElseIF ChildForm Is frmChilForm2 Then
    Directcast(ChildForm, frmChildForm2).Delete
.
.
.
Else
    ' Do Nothing
End IF

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.