Hi,
2) You need a tablestyle to adjust the column width. You need to create a
new datagrid to prevent the column and row resize.
Public Class NoResizeDataGri d
Inherits DataGrid
Protected Overrides Sub OnMouseDown(ByV al e As
System.Windows. Forms.MouseEven tArgs)
Dim hti As DataGrid.HitTes tInfo = Me.HitTest(New Point(e.X, e.Y))
If hti.Type = DataGrid.HitTes tType.ColumnRes ize Or hti.Type =
DataGrid.HitTes tType.RowResize Then
Return 'no baseclass call
End If
MyBase.OnMouseD own(e)
End Sub
Protected Overrides Sub OnMouseMove(ByV al e As
System.Windows. Forms.MouseEven tArgs)
Dim hti As DataGrid.HitTes tInfo = Me.HitTest(New Point(e.X, e.Y))
If hti.Type = DataGrid.HitTes tType.ColumnRes ize Or hti.Type =
DataGrid.HitTes tType.RowResize Then
Return 'no baseclass call
End If
MyBase.OnMouseM ove(e)
End Sub
End Class
Ken
-----------------------------
"jy836" <mo***@nospam.c om> wrote in message
news:B1e_b.1045 63$jk2.474135@a ttbi_s53...
1) When using images for an application (such as in an ImageList or as the
image for a button), are the images embedded in the application or must
the image files be included in the setup package?
2) Is there a way to adjust the individual column widths of a DataGrid
which has no TableStyles or GridColumnStyle s? Also, is there a way to make it
impossible for the user to resize the columns and rows?