PC Review


Reply
Thread Tools Rate Thread

Datagrid BackGround Image

 
 
Michael Turner
Guest
Posts: n/a
 
      20th Aug 2004
Anyone know if you can add a background image to a datagrid, there is a
property for colour but not for an image.



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmFjaGVs?=
Guest
Posts: n/a
 
      21st Aug 2004
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

"Michael Turner" wrote:

> Anyone know if you can add a background image to a datagrid, there is a
> property for colour but not for an image.
>
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Background image of DataGrid =?Utf-8?B?QnJ1Y2U=?= Microsoft VB .NET 2 28th Jan 2005 06:17 PM
datagrid background image Graeme Microsoft ASP .NET 2 29th Aug 2004 09:49 PM
giving the datagrid a background image kwarnke Microsoft Dot NET Framework Forms 3 4th May 2004 07:55 AM
DataGrid, header background image... =?Utf-8?B?ZWZmX2theQ==?= Microsoft ASP .NET 0 3rd Mar 2004 12:51 PM
Scrollable DataGrid with background image.. Iulian Ionescu Microsoft Dot NET Framework Forms 2 26th Aug 2003 03:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:55 AM.