Hi I found the solution but it seems does not work !
I found that the Shared function without End Function TAG
and it was a design time error
then I fixed it
well should I call the SetNoCurrentCell() from specific Event or just
on Load Form Event
can someone rewrite the code again with few notes & Comments
here's the code
Help will be approciated
I found that the Shared function without End Function TAG
and it was a design time error
then I fixed it
well should I call the SetNoCurrentCell() from specific Event or just
on Load Form Event
can someone rewrite the code again with few notes & Comments
here's the code
Code:
Public Class MyDataGrid
Inherits DataGrid
Public WM_LBUTTONDOWN As Integer = 513
Public WM_LBUTTONUP As Integer = 514
Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal msg As Int32,
ByVal wParam As Int32, ByVal lParam As Int32) As Boolean
End Function
Public Sub SetNoCurrentCell()
'click on top left corner of the grid
SendMessage(Me.Handle, WM_LBUTTONDOWN, 0, 0)
SendMessage(Me.Handle, WM_LBUTTONUP, 0, 0)
End Sub 'SetNoCurrentCell
End Class 'MyDataGrid
Help will be approciated