This should work, but does not. I am close. Any ideas?
Private Sub AddMyDataGrid()
' Create a button and add it to the form.
Dim dgrNewDataGrid As New DataGrid
' Anchor the datagrid to the left corner of the form
dgrNewDataGrid.Anchor = AnchorStyles.Left
' Assign a background image.
dgrNewDataGrid.BackgroundImage = Image.FromFile("C:\Documents and
Settings\Rachel D Kozlowski\My Documents\My Pictures\1.jpg")
' Make the datagrid the same size as the image.
dgrNewDataGrid.Size = dgrNewDataGrid.BackgroundImage.Size
' Add the datagrid to the form.
Me.Controls.Add(dgrNewDataGrid)
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.