The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have a main menu with one menu item named Customer. How do I add a "check" beside the Customer menu item once the user clicks the Customer item and the Customer form opens. Once the user closes the Customer form, i want the check beside the menu item to disappear. I tried adding this code in the Customer_Load:
dim frmMain as new frmMain()
frmMain.MainMenu.MenuItems(0).checked = true
but it doesn't work.
CBClay Burch Syncfusion Team August 28, 2002 08:24 AM UTC
Here you are creating a *new* frmMain. You want to get the one that already exists. Assuming that the parent class of this customer form is derived from Form, you might try this code.
dim f as Form = Me.Parent
f.MainMenu.MenuItems(0).checked = true
ADAdministrator Syncfusion Team August 28, 2002 09:14 PM UTC
thanks. i will try that. i'm really confused with the *new* instantiation of objects!! because if i don't use the *new* keyword to declare my object, i get an error. How do i pass a reference of form1 to form2 without creating a *new* form1 in form2?