devxlogo

Clearing menu bars

Clearing menu bars

Question:
I can’t seem to clear the default menus in a modal dialog box. I have triedall types of code in the OpenModal() method, but the default menusstill appear. How can I clear the default menus in a modal window?

Answer:
The recommended method to set up menus is the InitializeWindow()method. The InitializeWindow() method is called once when the windowis first created.

To clear all menu bars, you must create a menu bar, use theClearMenuBar() method bar to remove all the menus, and then assignthe cleared menu bar to the form with the SetMenuBar() method. Ifyour form was named frmMenu, the code would look like:

DIM mbSample AS ObjectmbSample = NEW MenuBarmbSample.ClearMenuBar()frmMenu.SetMenuBar(mbSample)

See also  Small Business Strategies with Venmo
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist