My first menu

I would like to insert a window.show event when I click on FormDeciarazioneAnnoContabile … but I don’t understand how to do it. The standard menu provided by Xojo works … but what if I wanted to add a new item / new event? Furthermore, the entry FormDeciarazioneAnnoContabile is disabled.

Immagine

You add a new Menu onto your existing MenuBar, then add a MenuHandler after this:

The problem is that I don’t understand how to add an event to the Menu … I would like when I click on FormDeclarationYearCounting to open a form / window.

That is what you want to do:

More information in the documentation; search with that text: “Add a Menu Handler”

It looks like this:

1 Like

You can also add them directly to Windows.

  1. Go to the Navigator
  2. Right-click on the item you want to add to
  3. Select the first item Add > Menu Handler
  4. Put your code in there

Ok guys, following your advice and seeing the video that talks about how to create the menu, I succeeded. Coming from VB6, however, I find the creation of the menu seems much more complex than in VB6.

Keep in mind that you are now working with a development platform that creates applications for multiple operating systems instead of just Windows.

I try :slight_smile: But I’m happy that the forum helps me so much, slowly I’m converting an old program written with VB6 in Xojo, improving the code where I can … thanks to all.

1 Like