D
dbuchanan
Is the following behavior normal?
Both the 'Protected sub' in the inherited form and the 'Private Shadows
sub' in the derived form fires.
My interpretation of MSDN help on the topic "Shadows" does not seem to
indicate that this is the designed behavior. (the topic is rather
cryptic to me.
Here is my code;
=== In the Inherited form is this code; ===
Protected Sub DataGrid1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseUp
MessageBox.Show("DataGrid1_MouseUp - frmForm1")
'Highlight the entire row
'Get the X and Y of the DataGrid from the mouse event
Dim pt As New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = Me.DataGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
'Me.DataGrid1.CurrentCell = New DataGridCell(hti.Row,
hti.Column)
Me.DataGrid1.Select(hti.Row)
End If
End Sub
=== In the derived form is this code; ===
Private Shadows Sub DataGrid1_MouseUp(ByVal sender As Object, ByVal
e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseUp
MessageBox.Show("DataGrid1_MouseUp - frmJobCustomer")
Call PopulateStatusBarData()
Call RowSelectedToEdit()
End Sub
=========================================
Both subs fire. First the code in the inherited form and second the
code in the derived from.
This is the behavior I desire, but is this behavior what it is supposed
to do - can I rely on it?
Thank you,
Doug.
Both the 'Protected sub' in the inherited form and the 'Private Shadows
sub' in the derived form fires.
My interpretation of MSDN help on the topic "Shadows" does not seem to
indicate that this is the designed behavior. (the topic is rather
cryptic to me.
Here is my code;
=== In the Inherited form is this code; ===
Protected Sub DataGrid1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseUp
MessageBox.Show("DataGrid1_MouseUp - frmForm1")
'Highlight the entire row
'Get the X and Y of the DataGrid from the mouse event
Dim pt As New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = Me.DataGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
'Me.DataGrid1.CurrentCell = New DataGridCell(hti.Row,
hti.Column)
Me.DataGrid1.Select(hti.Row)
End If
End Sub
=== In the derived form is this code; ===
Private Shadows Sub DataGrid1_MouseUp(ByVal sender As Object, ByVal
e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseUp
MessageBox.Show("DataGrid1_MouseUp - frmJobCustomer")
Call PopulateStatusBarData()
Call RowSelectedToEdit()
End Sub
=========================================
Both subs fire. First the code in the inherited form and second the
code in the derived from.
This is the behavior I desire, but is this behavior what it is supposed
to do - can I rely on it?
Thank you,
Doug.