This will translate for you.
http://authors.aspalliance.com/aldotnet/examples/translate.aspx --=20
Brian P. Hammer
[quoted text, click to view] "vedant_15" <vedant(removethis)_15@hotmail.com> wrote in message =
news:7439CFA6-5CCA-4B5D-931B-77AF9A857F86@microsoft.com...
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] "Herfried K. Wagner [MVP]" wrote:
> * =3D?Utf-8?B?dmVkYW50XzE1?=3D <vedant(removethis)_15@hotmail.com> =
scripsit:
> > 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.
>=20
> Taken from a post by Joachim Fuchs:
>=20
> \\\
> 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
> --=20
> Herfried K. Wagner [MVP]
> <URL:
http://dotnet.mvps.org/>