本文介绍了启用menustrip项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过以下代码加载子表单并在父级上禁用Menustrip项目:



 Dim ge As New GenerateID 
ge.TopLevel = False
Me.GBempIDcard.Controls.Add(ge)
ge.StartPosition = FormStartPosition.CenterParent
ge.Show()
MenuS.Enabled =假







我可以帮助我点击如何启用menustrip项目在vb的子表单上关闭按钮?



我尝试过:



我试过:



 Private Sub btnexit_Click(sender As Object,e As EventArgs)处理btnexit.Click 
Me。关闭()
empIDcards.MenuS.Enabled = True

结束Sub



但它不启用

解决方案

I am able to load a child form and disable Menustrip Items on the parent by this code:

Dim ge As New GenerateID
    ge.TopLevel = False
    Me.GBempIDcard.Controls.Add(ge)
    ge.StartPosition = FormStartPosition.CenterParent
    ge.Show()
    MenuS.Enabled = False




Please can someone help me with how to enable menustrip items when i click close button on the child form in vb?

What I have tried:

I tried:

Private Sub btnexit_Click(sender As Object, e As EventArgs) Handles btnexit.Click
       Me.Close()
       empIDcards.MenuS.Enabled = True

   End Sub


But it does not enable

解决方案


这篇关于启用menustrip项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 08:33