I have to create an application that will dynamically add a menu strip with menu items to a form(ie NOT dragged and dropped onto the form) in Visual Basic. The menu strip should be created in the Form_Load event handler.
I have to use a TextBox for user input. If the user enters information into the TextBox and clicks on the Add Button, the text should be added to a ComboBox control.A Menu should then be created that must be added to the menu strip dynamically.
There should be a second TextBox that will be used to add a new menu item to the menu that is currently selected in the ComboBox.
When a menu item is selected, it must simply display a MessageBox with the items name (For example, adding a menu item called View would display a MessageBox with the message “View”)
I have to create a quiz machine program in in Visual Basic with the following:
A menu strip that must be created programmatically (ie NOT dragged and dropped onto the form). There should be an exit option added to the menu strip that must exit the application.
A structure must be created to encapsulate all the questions and suggested answers. The structure must contain:
Correct Answer String
When the form loads, 5 questions must be created in code using these structures. These 5 structures will then serve as the quiz. The user must be shown the first question, and have the option of browsing forwards and backwards through the quiz. The program should store saved answers to select the radio button when users cycle through. This can be done by any means possible, for example an ArrayList or SortedList.
I have to ensure that the suggested answers are randomized the first time the form loads only.
Once the user has selected an answer for every question, the Submit button should be enabled. When the user clicks this button, the program must then evaluate the quiz and compare the users selected answers against the correct answer. A valid message must then be displayed via a MessageBox indicating the user's score.
I desperately need the code to create these applications!
Jump to Post
This sounds like a homework assignment. We are here to offer help if you are having trouble in specific areas but we will not do your homework for you. Please show us what you have done so far.
Jump to Post
An easy way to see how to code a menu strip is to create a sample project and add a menu strip using the designer. Save the project, then use notepad to look at the generated code in the project folder. The file will have a name like
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.