01.
copy to clipboard | view source | convert again
02.
Public
Sub
New
()
03.
InitializeComponent()
04.
For
Each
ts
As
ToolStrip
In
crystalReportViewer1.Controls.OfType(Of ToolStrip)()
05.
For
Each
tsb
As
ToolStripButton
In
ts.Items.OfType(Of ToolStripButton)()
06.
07.
If
tsb.ToolTipText.ToLower().Contains(
"print"
)
Then
08.
09.
tsb.Click +=
New
EventHandler(
AddressOf
printButton_Click)
10.
End
If
11.
Next
12.
Next
13.
End
Sub
14.
15.
Private
Sub
printButton_Click(sender
As
Object
, e
As
EventArgs)
16.
MessageBox.Show(
"Printed"
)
17.
End
Sub