Creating DrawItemEventArgs for MenuItem

T

Tom

Hi

I am trying to force a drawitem for an owner drawn menuitem. As the
menuitem has no invalidate method i thought that i could just call the
overriden drawitem method, this need a DrawItemEventArgs parameter,
which i cannot create for the MenuItem. Anyone know how to force it?

I can create it using the CreateGraphics property of the parent
control, however this redraws the menuitem on the parent control
rather than the menu item... not so good:



Thanks

Tom
 
B

Bharat Patel [MSFT]

Hi Tom,

Look at the work-around section of the following article for the code snippet
in C# to create a new DrawItemEventArgs object.

834530 BUG: The DrawItemEventArgs object returns incorrect ForeColor and
http://support.microsoft.com/?id=834530

You can follow the same logic in VB .net.

Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top