Disabling menu item in mdi child form?

cwyong1

Active member
Joined
May 20, 2007
Messages
35
Programming Experience
Beginner
OK. My queston is like. How do i disabled a mdi parent main menu sub item inside the mdi child form?
THANK YOU IN ADVANCE

VB.NET:
Public Partial Class frmForm2
	
	Public ButtonArray(12) As Button
	Public ii As Integer
	
	Public Sub New()
		' The Me.InitializeComponent call is required for Windows Forms designer support.
		Me.InitializeComponent()
		
		'
		' TODO : Add constructor code after InitializeComponents
		'
	End Sub
	
	Sub frmForm2Load(ByVal sender As Object, ByVal e As EventArgs)
		ME.WindowState = 2
       For i As Integer = 0 To 11
            Dim tb As New Button
            'tb.Location = New Point(10, i * tb.Height)
            ButtonArray(i) = tb
			'buttonarray(i).Top = 200
			buttonarray(i).Width = (tb.Width + ((me.clientsize.Width - (tb.Width * 12)) /12)) - 1
            ButtonArray(i).Visible = True
            ButtonArray(i).Left = ButtonArray(i).width * i
            ButtonArray(i).TabStop = false
        Next			
		Me.Controls.AddRange(ButtonArray)
	End Sub

End Class
 
What does that code have to do with menu? MergeAction property of the menu items might have relevance to the question.
 
This is the code for the child form which is activated by selecting the "NEW" option under the "File" menu. Actually what i want is to disabled the "New" option inside the child form. Can you tell me how to do so? Friend
 
I forgot to mentioned that i am abled to disabled in the parent form by coding this
VB.NET:
ME.newToolStripMenuItem.Enabled = FALSE

But how do i accessed this in my child form.. Any idea, Friend?
 
I have already found out the solution to my problem. But thank anyway to all you people that read my posting

THANK YOU
 
Back
Top