Click here to Skip to main content
15,901,122 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to make a Text Box only Numbers Pin
Werdna20-Feb-04 8:31
Werdna20-Feb-04 8:31 
AnswerRe: How to make a Text Box only Numbers Pin
Judah Gabriel Himango20-Feb-04 8:34
sponsorJudah Gabriel Himango20-Feb-04 8:34 
GeneralParsers Pin
Husein20-Feb-04 7:40
Husein20-Feb-04 7:40 
GeneralRe: Parsers Pin
Werdna20-Feb-04 8:26
Werdna20-Feb-04 8:26 
GeneralUse an ACtiveX in my .NET application Pin
Mazdak20-Feb-04 2:56
Mazdak20-Feb-04 2:56 
GeneralRe: Use an ACtiveX in my .NET application Pin
Heath Stewart20-Feb-04 3:18
protectorHeath Stewart20-Feb-04 3:18 
GeneralRe: Use an ACtiveX in my .NET application Pin
Mazdak20-Feb-04 4:26
Mazdak20-Feb-04 4:26 
GeneralRe: Use an ACtiveX in my .NET application Pin
Heath Stewart20-Feb-04 6:23
protectorHeath Stewart20-Feb-04 6:23 
GeneralRe: Use an ACtiveX in my .NET application Pin
Mazdak20-Feb-04 9:16
Mazdak20-Feb-04 9:16 
GeneralRe: Use an ACtiveX in my .NET application Pin
Heath Stewart20-Feb-04 10:10
protectorHeath Stewart20-Feb-04 10:10 
GeneralRe: Use an ACtiveX in my .NET application Pin
Mazdak20-Feb-04 3:25
Mazdak20-Feb-04 3:25 
GeneralListing files&folders on a server Pin
CWIZO20-Feb-04 1:31
CWIZO20-Feb-04 1:31 
GeneralRe: Listinf files&folders on a server Pin
Mazdak20-Feb-04 1:54
Mazdak20-Feb-04 1:54 
GeneralRe: Listing files&folders on a server Pin
CWIZO20-Feb-04 2:01
CWIZO20-Feb-04 2:01 
GeneralRe: Listing files&folders on a server Pin
Mazdak20-Feb-04 2:10
Mazdak20-Feb-04 2:10 
GeneralRe: Listing files&folders on a server Pin
Mazdak20-Feb-04 2:15
Mazdak20-Feb-04 2:15 
GeneralRe: Listing files&folders on a server Pin
CWIZO20-Feb-04 3:33
CWIZO20-Feb-04 3:33 
GeneralRe: Listing files&folders on a server Pin
Mazdak20-Feb-04 3:45
Mazdak20-Feb-04 3:45 
GeneralRe: Listing files&folders on a server Pin
CWIZO20-Feb-04 9:58
CWIZO20-Feb-04 9:58 
GeneralOwner drawn Menu Items Pin
Katalin20-Feb-04 0:20
Katalin20-Feb-04 0:20 
GeneralRe: Owner drawn Menu Items Pin
Heath Stewart20-Feb-04 3:30
protectorHeath Stewart20-Feb-04 3:30 
GeneralRe: Owner drawn Menu Items Pin
Katalin20-Feb-04 4:28
Katalin20-Feb-04 4:28 
GeneralRe: Owner drawn Menu Items Pin
Heath Stewart20-Feb-04 6:14
protectorHeath Stewart20-Feb-04 6:14 
The MenuItem.DrawItem event gives you the the Graphics object you should be using. It's possible the out-of-memory exception is because a Graphics object has already been created from the window handle, which obtained the HDC internally. There can only exist one HDC for the drawing operation, IIRC.

I threw together a quick test and see what you mean. Unfortunately, .NET probably has nothing to do with this since it merely encapsulates the Windows APIs. You could always try adjusting the SizeF in which the text is drawn so that the menu item is long enough to display some space between the arrow and the text. I have heard that there are some quirks in right-to-left reading orders, and this appears to be one. Googling for this subject pretty much comes up with that idea - offsetting your text appropriately.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Owner drawn Menu Items Pin
Katalin22-Feb-04 21:47
Katalin22-Feb-04 21:47 
GeneralRe: Owner drawn Menu Items Pin
Heath Stewart23-Feb-04 3:32
protectorHeath Stewart23-Feb-04 3:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.