Solved

How to set DataGrid window color

Posted on 2002-07-04
1
264 Views
Last Modified: 2006-11-17
Does anyone know how to set the window background color of a datagrid control?  This is the color of the area between the control border and the grid of cells.  DataGrid1.BackColor sets the background color of the cells and not of this area.  Please provide code if you can.

I suspect

 SendMessage(DataGrid1.hWnd, theMessageID, 0, theCOLOREFColor)

along with OleTranslateColor() to convert the VB color to RGB is the way to do it but I don't know theMessageID to change the window color.

Actually I would like to set the background color to that of the content area of an MDI child window.
0
Comment
Question by:ASP_Ray
1 Comment
 
LVL 4

Accepted Solution

by:
TomLaw1999 earned 75 total points
ID: 7132576
I believe that the correct answer is that you can't. The datagrid supplied with visual basic is really a stripped down version of a commercially available grid and many of the functions are not available.

There are several commercial options available i.e Truegrid etc. and I am sure that one of these would serve your purpose.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now