I am trying to show a message to the user who will tell them
"don "column resize not"
as soon as they there is a I want to know that my mouse pointer is behaving when the column breaker of one clicked Pre-Money Thanks ... DataGridView .
DataGridViewColumnDividerMouseDrag vb.net?
DataGridView
You have a global variable that is MouseDown
DataGridView
create a dataGridView.ColumnWidthChanged
event to capture a change in column width.
You can use DataGridView MouseDown
and DataGridView.ColumnWidthChanged
Not really a The columndividermouseDrag
event, but it will allow a beginning
Global variables
as dim Mughestets as Boolean Dim Globl_ agency Mausiventargs
capture Events
private sub DataGridView2_MouseDown (this object as, e System.Windows.Forms.MouseEventArgs) handles DataGridView2.MouseDown e.Button = Windows.Forms.MouseButtons.Left then mousestatus = true global_e = end e end sub private sub DataGridView2_Mouseup (this object , E System.Windows.Forms.MouseEventArgs The sector as) manages DataGridView2.MouseUp so e.Button = as Windows .Forms.MouseButtons.Left then mousestatus = false global_e = e end if End Sub Private Sub DataGridView2_ColumnWidthChanged (ByVal this object, ByVal e _ DataGridViewColumn EventArgs) handles DataGridView2.ColumnWidthChanged If mousestatus = True then MessageBox.Show ( "do not change the column size") otherwise end if sub
Comments
Post a Comment