Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with MenuBar

Status
Not open for further replies.

LastCyborg

Programmer
Feb 7, 2003
256
MX
I'm programming a MDI application wich one has a menu bar, so I have a MDIChild form and it contains an Edit, but when I want to introduce ASCII code to the Edit, it doesn't works fine, because when I press the Alt button the menubar gets the focus, so the question is what can I do to write ASCII code in a MDIchild form?



---LastCyborg---
 
What version of Builder do you have? V. 6.0 seems to support just what you want. Earlier ones might not. It seems like you might have to override the default message event for a keypress in the application (not the OnKeyPress event handler). You could start a timer as soon as the alt key is pressed and if no other keys are pressed within a second or so, perform standard processing. Or if the user presses Alt and any series of letters, continue immediately. But if they press Alt and a series of numbers, grab the ascii code and set the TEdit to it.

The virtual-key code you are looking for is VK_MENU.

Chris
 
I have BCB 6, and I understand what you say, but how can I make that?



---LastCyborg---
 
I have the program working very well, the problem was that I was using the ActionMainMenuBar(and an ActionManager), and it component generates that problem, but using a common MainMenuBar what I want works fine.

I like to know how to make that thing you say, if you have an example let me copy it here please



---LastCyborg---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top