title: Unable to cast object of type 'System.EventArgs' to type 'System.Windows.Forms.KeyPressEventArgs'
body: <p>When clicking on required item in a populated List view following error occurs when clicking frm.showdialog:</p>
  
  <blockquote>
    <p>Unable to cast object of type 'System.EventArgs' to type 'System.Windows.Forms.KeyPressEventArgs'</p>
  </blockquote>
  
  <pre><code>Private Sub mnuView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuView.Click
      Dim frm As New frmAllView
      tsStatus.Text = ""
      FormChange(bFormChanged)
      Me.Hide()
      If Not dataMgr.MTDatabase Then
          MessageBox.Show("Enter a record to continue", "No records")
          Me.Show()
      Else
          frm.ShowDialog()  '//--- **error occurs here** ---
          If frm.lvwDisplay.SelectedIndices.Count = 0 Then
              Exit Sub
          Else
              iID = CInt(frm.lvwDisplay.SelectedItems(0).Index)
              NoRecords()
              dataMgr.FindOneName(iID, nc)
              FillBoxes()
  
          End If
  End Sub
  </code></pre>