batutabunsing
Member
- Joined
- Mar 3, 2008
- Messages
- 19
- Programming Experience
- Beginner
Hello everyeone.
I am a newbie with regards to development and programming and I have chosen the path of Winforms and VB.Net.
Currently, I am developing an application. This application has a main form, where there is also a menu item. The menu item corresponds to opening the different windows.
I think they call this development MDI..
Anyway, I got a few questions which I think most of you would be able to answer right away.
In my main form, I have a menu setup like this:
Now, When I click on menu item for example Requests | Service, i am supposed to open a win form named frmService.
I double click on the menu item and the following code comes out.
As you can see, I want to know which menu item I have clicked so that i could open the appropriate window.
Like for example:
Next question I got is this..
Since we know that the parent form contains the menu above, I have a different set menu for my other winforms.
Like for example in my frmServices, there will be a menu whose structure is this
So that when the frmService window is opened, the menu which is displayed on the main parent will become the menu of the child window
I hope you guys and gals could give me advice.
Thank you.
I am a newbie with regards to development and programming and I have chosen the path of Winforms and VB.Net.
Currently, I am developing an application. This application has a main form, where there is also a menu item. The menu item corresponds to opening the different windows.
I think they call this development MDI..
Anyway, I got a few questions which I think most of you would be able to answer right away.
In my main form, I have a menu setup like this:
Requests
-- Car
-- Service
Schedule
-- Daily
-- Monthly
Reports
-- Transport
-- Travel
-- Allowances
Now, When I click on menu item for example Requests | Service, i am supposed to open a win form named frmService.
I double click on the menu item and the following code comes out.
VB.NET:
Private Sub menu1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles menu1.Click
End Sub
As you can see, I want to know which menu item I have clicked so that i could open the appropriate window.
Like for example:
VB.NET:
Private Sub menu1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles menu1.Click
' Requests | Service item clicked
frmService.Show()
' Schedule | Daily item clicked
frmDailySchedule.Show
End Sub
Next question I got is this..
Since we know that the parent form contains the menu above, I have a different set menu for my other winforms.
Like for example in my frmServices, there will be a menu whose structure is this
Machine
-- Computer
-- Fax
Office Equipment
-- Tables
-- Chairs
So that when the frmService window is opened, the menu which is displayed on the main parent will become the menu of the child window
I hope you guys and gals could give me advice.
Thank you.