Well, I just would like to point out that Mike's definition of an additional menu item also works, when you define the prompt of the extra menu with leading spaces. It's hard to find out how many spaces you need exactly for the precise right-aligned positioning of a user name, as different names have different widths, but there are possibilities with Fontmetric() and the Txtwdith() function.
There's a third solution, as always, by using GDI+ to draw text anywhere on the desktop, the downside is quite the same as with the extra form: Whenever paint events happen the text is gone, so you have to rewrite the text. It's even more complicated, so I spare posting that code. You can in principle find it in
in a paragraph about typography using the graphics.DrawString function. After trying it I think there are more problems GDI+ text rendering raises than it solves. One further problem is finding the right font and size. I noticed the way VFP writes text just with ? on screen or the way label captions are written out differs a bit. And that's also true using the DrawString function of GDI+. In ClearType mode, you have to write text at the same position twice to get the same look as menu items.
That's partly due to how Windows handles fonts with ClearType, but also because the different ways to output strings you have in VFP differ in kerning, too. That can be seen if you have letter combinations like To (where the o is rendered nearer to the vertical line of the T with kerning or AV where V is rendered nearer to the A. The label caption, for example, is rendered with kerning, a menu item prompt is rendered with kerning, but text within a textbox isn't rendered with kerning. So rendering of texts isn't homogenous in VFP.
So there's one more finding of a buggy behavior of VFP spotted by experimenting with GDI+ DrawString. Even without it just the difference of text rendering within a menu prompt, a label caption, the value of a textbox and using the ? command are differing in terms of kerning. You should get the same output from all, when using the same font and font size and font styles, shouldn't you?
Chriss