Hi there,
I am adding a tool strip manu item programatically using the following given code. what i want is that as the user adds another revision to the application, the previous revision gets unchecked and the new revision gets checked (bottom 2 lines of the code). I have no idea as to how to address the newly added item. I have tried all diff kinds of names but VB doesnot reconganizes any. Can you guys tell me how to do it. I am writing the code in a sub routine which uses frmProject as argument.
==========================================================
Dim mnuItemRevision As New System.Windows.Forms.ToolStripMenuItem
currentrevision = currentrevision + 1
mnuItemRevision.Name = "mnuItemRevisions" & currentrevision
mnuItemRevision.Text = "Revision " & currentrevision
frmProject.mnuRevisions.DropDownItems.Add(mnuItemRevision)
frmProject.mnuItemRevisions1.checked = False
**** frmProject.mnuItemRevisions2.checked = True
==========================================================
currentrevision = 1 at the beginning of the code.
**** - trouble area...
Please help. I am a begineer to any kind of programming, so detailed and easily explained answers will be helpful
I am using VB 2005
thanks
rohit
I am adding a tool strip manu item programatically using the following given code. what i want is that as the user adds another revision to the application, the previous revision gets unchecked and the new revision gets checked (bottom 2 lines of the code). I have no idea as to how to address the newly added item. I have tried all diff kinds of names but VB doesnot reconganizes any. Can you guys tell me how to do it. I am writing the code in a sub routine which uses frmProject as argument.
==========================================================
Dim mnuItemRevision As New System.Windows.Forms.ToolStripMenuItem
currentrevision = currentrevision + 1
mnuItemRevision.Name = "mnuItemRevisions" & currentrevision
mnuItemRevision.Text = "Revision " & currentrevision
frmProject.mnuRevisions.DropDownItems.Add(mnuItemRevision)
frmProject.mnuItemRevisions1.checked = False
**** frmProject.mnuItemRevisions2.checked = True
==========================================================
currentrevision = 1 at the beginning of the code.
**** - trouble area...
Please help. I am a begineer to any kind of programming, so detailed and easily explained answers will be helpful
I am using VB 2005
thanks
rohit