Imports System.Windows.Forms
Imports System.Drawing

Public Class usrcntlKdSearch
    Public Event DGV_Click(sender As Object, e As EventArgs)
    Public Event DGV_INAKTIV_Click(sender As Object, e As EventArgs)
    Public Event DGV_KeyDown(sender As Object, e As KeyEventArgs)
    Public Event DGV_INAKTIV_KeyDown(sender As Object, e As KeyEventArgs)
    Public Event CLOSE(sender As Object, e As EventArgs)

    Private Sub dgvKundenAktiv_Click(sender As Object, e As EventArgs) Handles dgvKundenAktiv.Click
        RaiseEvent DGV_Click(sender, e)

    End Sub

    Private Sub dgvKundenInAktiv_Click(sender As Object, e As EventArgs) Handles dgvKundenInAktiv.Click
        RaiseEvent DGV_INAKTIV_Click(sender, e)
    End Sub

    Private Sub dgvFindKD_Click(sender As Object, e As KeyEventArgs) Handles dgvKundenAktiv.KeyDown
        RaiseEvent DGV_KeyDown(sender, e)
    End Sub

    Private Sub dgvFindKD_INAKTIV_Click(sender As Object, e As KeyEventArgs) Handles dgvKundenInAktiv.KeyDown
        RaiseEvent DGV_INAKTIV_KeyDown(sender, e)
    End Sub


    Private Sub usrcntlKdSearch_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
        Me.pnl.Location = New Point(2, 2)
        Me.pnl.Size = New Size(Me.Width - 4, Me.Height - 4)
    End Sub

    Private Sub lblClose_Click(sender As Object, e As EventArgs) Handles lblClose.Click
        RaiseEvent CLOSE(sender, e)
    End Sub

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        Try
            MyBase.OnPaint(e)
        Catch ex As Exception
            Me.Invalidate()
        End Try
    End Sub

    Private Sub dgvKundenAktiv_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvKundenAktiv.CellContentClick
        RaiseEvent DGV_Click(sender, e)

    End Sub
End Class
