Click to See Complete Forum and Search --> : Assign code to a menuitem


C B
July 17th, 1999, 07:56 PM
Hey.

Im going to make my app visible in the system tray and i followed the example in MSDN but cant get the menuitems to work.
I have added one item on the main level called SysTray with the name 'mPopupSys' then i have two items on that one called 'mPopRestore' and 'mPopExit'.

Then when im going to declare them and add code to them i get following error msg:
'Procedure declaration does not match description of event or procedure having the same name'

This is how i declared them in my form:
private Sub mPopExit_Click()
Unload me
End Sub



I tried to make them public or just sub's but it doesnt work.. it seems like they are in somekind of conflict with the menuitems.. dunno..
Im sure that i havent delcared the procedure twice, ive checked that =)

Please help.

C B

Lothar Haensler
July 19th, 1999, 01:49 AM
did you specify an Index property in the menu editor for your menu items?
If so, the declaration should look like this:

private Sub mPopExot_Click(Index as Integer)

End Sub