all groups > dotnet windows forms > june 2004 >
You're in the

dotnet windows forms

group:

MainMenu Colour



MainMenu Colour vedant_15
6/18/2004 11:54:01 PM
dotnet windows forms: How can I change a main menu's colour ?
It appears white in the design view but when i run the app it is grey.
--
There are 10 types of people. Those who understand binary and those who dont.

Re: MainMenu Colour vedant_15
6/19/2004 8:15:02 AM
I need the code for VB. This is for (i think) c#.
anyone who can translate or know how to change the menucolour to vb.
private void menuItem1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
{
System.Drawing.Drawing2D.LinearGradientBrush brush =
new System.Drawing.Drawing2D.LinearGradientBrush(new Point(0,0), new Point(1300,0), Color.DarkGreen, Color.White);
e.Graphics.FillRectangle(brush, e.Bounds.Left, e.Bounds.Top, 1300, e.Bounds.Height);
brush.Dispose();
}

--
There are 10 types of people. Those who understand binary and those who dont.

Vedant Lath


[quoted text, click to view]
Re: MainMenu Colour hirf-spam-me-here NO[at]SPAM gmx.at
6/19/2004 2:02:40 PM
* =?Utf-8?B?dmVkYW50XzE1?= <vedant(removethis)_15@hotmail.com> scripsit:
[quoted text, click to view]

Taken from a post by Joachim Fuchs:

\\\
private void menuItem1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
{
System.Drawing.Drawing2D.LinearGradientBrush brush =
new System.Drawing.Drawing2D.LinearGradientBrush(new Point(0,0), new Point(1300,0), Color.DarkGreen, Color.White);
e.Graphics.FillRectangle(brush, e.Bounds.Left, e.Bounds.Top, 1300, e.Bounds.Height);
brush.Dispose();
}
///

--
Herfried K. Wagner [MVP]
Re: MainMenu Colour Brian P. Hammer
6/19/2004 11:11:04 PM
This will translate for you.

http://authors.aspalliance.com/aldotnet/examples/translate.aspx


--=20
Brian P. Hammer
[quoted text, click to view]
I need the code for VB. This is for (i think) c#.
anyone who can translate or know how to change the menucolour to vb.
private void menuItem1_DrawItem(object sender, =
System.Windows.Forms.DrawItemEventArgs e)
{
System.Drawing.Drawing2D.LinearGradientBrush brush =3D
new System.Drawing.Drawing2D.LinearGradientBrush(new =
Point(0,0), new Point(1300,0), Color.DarkGreen, Color.White);
e.Graphics.FillRectangle(brush, e.Bounds.Left, e.Bounds.Top, 1300, =
e.Bounds.Height);
brush.Dispose();
}

--=20
There are 10 types of people. Those who understand binary and those =
who dont.

Vedant Lath


[quoted text, click to view]
Re: MainMenu Colour hirf-spam-me-here NO[at]SPAM gmx.at
6/20/2004 3:27:57 PM
Re: MainMenu Colour Sung
7/15/2004 2:19:03 AM
I have added a dummy menuitem (with no function and text) to the mainmenu and use the codes to handle it and draw the mainmenu with colour.
But the other menu items in the mainmenu are disappeared until mouse over and they are in grey. How to solve it?

Thanks!

[quoted text, click to view]
AddThis Social Bookmark Button