C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-28-2003, 02:14 PM   #1
Registered User
 
Join Date: Apr 2003
Posts: 31
Backcolor-Qs

hi

may i ask Q please
1- how can i change the backcolor for mainmenu
2-how can i change the backcolor for DataGrid
3-can i change the form of the Form to my own if yes how ?

thank u
Dragon227Slayer is offline   Reply With Quote
Old 12-01-2003, 04:53 AM   #2
Registered User
 
Join Date: Apr 2003
Posts: 31
Please can any body answer me if that possible or not , even if u don't know how!!!!
Dragon227Slayer is offline   Reply With Quote
Old 12-01-2003, 08:12 AM   #3
the hat of redundancy hat
 
nvoigt's Avatar
 
Join Date: Aug 2001
Location: Hannover, Germany
Posts: 2,769
1- how can i change the backcolor for mainmenu

You can make it ownerdrawn and override the OnPaint method.

2-how can i change the backcolor for DataGrid

Propably the same method, don't know for sure though.

3-can i change the form of the Form to my own if yes how ?

Yes, but I think that would involve some WINAPI routines with region.
__________________
hth
-nv

She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

When in doubt, read the FAQ.
Then ask a smart question.
nvoigt is offline   Reply With Quote
Old 12-01-2003, 08:55 AM   #4
Registered User
 
Join Date: Apr 2003
Posts: 31
thank u very much Mr nvoigt


but would u please explain the first part with example because i am a bigner in C#( i couldn't understand u)
Dragon227Slayer is offline   Reply With Quote
Old 12-09-2003, 09:22 AM   #5
Cat without Hat
 
CornedBee's Avatar
 
Join Date: Apr 2003
Posts: 8,492
1) Very difficult. Menus are such an integral part that they don't allow much interference from the application. However, you can make an owner-drawn menu. This means that you draw the menu items yourself. You can use this to draw them with a different background, but you must otherwise emulate Windows.

2) Doesn't the DataGrid simply have a background property?
I find
DataGrid.BackgroundColor
DataGrid.BackColor
DataGrid.AlternateBackColor
Those should suffice.

3) By giving the form a region. Every class deriving from Control has a Region property of type Region, which specifies the displayed region of the control. Using complex regions you can create weird windows, like the DivX player does.
__________________
All the buzzt!
CornedBee

"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
CornedBee is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -6. The time now is 12:00 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22