Log in

View Full Version : Enabling menu item in delphi target ?


MrSmith
December 3rd, 2001, 08:34
Hi,

I'm working on a program, written in Delphi4, where I would like to enable a disabled menu item (printing).
First I used Restorator to look into the resources. There the menu item was not marked as disabled and so I thought it must be disabled somewhere in the program code.
Therefore I used Dede to disassemble the Delphi program. I found the formCreate event for the form, which defines the menu and disassembled it. But unfortunately I didn't find a call which disables the menu item :-(

I'm not a Delphi expert, so how would the menu item be disabled in Delphi ?
Has it do be inside the formCreate event or can it be somewhere else ?
Is there a recommended way for enabling disabled menu items ?

Cheers,

MrSmith

4oh4
December 3rd, 2001, 14:24
The most often seen (for me) method of disabling/enabling menu items in delphi is as the menu item is being accessed. It's the "onclick" event if memory serves. Of course, as with any language, it could occur whenever the programmer desires.

stealthFIGHTER
December 8th, 2001, 11:18
Hello MrSmith,

if you want, I'll send you test program that enable/disable the menu I've created. I've tried to examine it using DeDe and I think it should be clear to you .

I think the menu is disabled on startup (in many cases) so there cannot be any 'onclick' action.

Regards,
sF