John, thanks very much, didn't know that was there. I was wondering if you
could help point me in the direction of finding out more about USER objects
(as per the column in Task Manager) I'm going to start a new project now
and experiment what happens when you create certain components and how this
contributes to the USER object count - also the effect Show( ) will have on
USER objects when making the form visible. Anything I find out will be
empirical, so I was wondering if you know of any formal articles on this
matter. I have trolled through many pages but havent come across anything
helpful
Regards
Wal
"Wal Turner" <vo****@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP15.phx.gbl...
My general question is:
How does one determine the font of a System.Windows.Form.MenuItem?
I have a custom MenuItem where I have set OwnerDraw = true, and hence the
implementations of DrawItem and MeasureItem.
With a menuitem, there is nothing like menuItem.Font to get the current
Font. This is causing a problem when coding MeasureItem as I don't know
how wide the menu item is supposed to be:
e.ItemWidth = (int)e.Graphics.MeasureString(menu.Text,
<FONT_ARG_HERE).Width;
When coding DrawItem its OK because we have a DrawItemEventArgs which has
a Font as a property.
Regards
Wal