Private Sub ToolBar1_ButtonClick()Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick Select Case e.Button.Text Case "OK" ''''"OK" is ToolBarButton.Text If fr Is Nothing Or fr.IsDisposed Then fr = New frmName With fr .MdiParent = Me .Show() End With Else With fr .MdiParent = Me .Show() .Focus() End With End If End Select End Sub 所以大家使用的时候要当心点 分析,就是关闭了实例了一次的窗口后,fr is nothing ,所以fr是不被with所使用的,改了with的使用范围之后就没有错误出现. ---end---