How to get a custom toolbar buttons on vb.net winform and how to override it.

  • Thread starter Syed Zaidi via .NET 247
  • Start date
S

Syed Zaidi via .NET 247

I am working on a small project in which i want to develop acustom toolbar skeleton for handling database navigation. I havecreated a usercontrol consist of a toolbar inherits fromusercontrol and winform holding that control. First I want toaccess the Click functionality of each toolbar button(usercontrol) in my winform which holding the usercontrol; secondlywants to override the methods of usercontrol in winformaccordingly to the click event of toolbar buttons from winform.
User Control Class
Public Class TBSDbAccess
Inherits System.Windows.Forms.UserControl
'Implements ControlAccess
Public Sub tlbDbAccess_ButtonClick(ByVal sender AsSystem.Object, ByVal e AsSystem.Windows.Forms.ToolBarButtonClickEventArgs)
Select Case tlbDbAccess.Buttons.IndexOf(e.Button)
Case 0 'First Record
MsgBox("0")
FirstRecord()
End Select
End Sub

Public Overridable Sub FirstRecord()

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top