我有event handler
这个Mainform.vb
:
Private Sub picturePanel_Paint(sender As System.Object, e As System.Windows.Forms.PaintEventArgs) Handles picturePanel.Paint
If fBitmap IsNot Nothing Then
g = picturePanel.CreateGraphics()
g.DrawImage(fBitmap, 0, 0)
g.Dispose()
End If
End Sub
从我试图调用这个处理程序的私有方法updateView
,但对参数有点不确定 - 我假设第一个参数只是,第二个参数必须与Mainform.vb
Me.picturePanel
PaintEventArgs
Private Sub updateView()
'picturePanel.Refresh() '<<<<<<<<<this is fine but thought the following might work...
picturePanel_Paint(Me.picturePanel, PaintEventArgs)
End Sub
编辑
以下手动调用事件的尝试失败: