Problem re-enabling menu item

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • johndevlon@hotmail.com

    #1

    Problem re-enabling menu item

    Hi,
    Can someone please help me. I've got a strang problem in Visual Studio
    2005

    I've created a windows application, using an MDI form and top menu.
    When a menu item is clicked, a new instance of a form appeirs.

    At the same time, i'm disabling the menu item to prevent opening it
    again.

    I've placed some code in the new form, so when it is closed, it should
    re-enable the menu item in the main MDI-form.

    Unfortunately, the menu-item will not re-enable.


    john

  • Dave O.

    #2
    Re: Problem re-enabling menu item

    2 points

    1) "I've placed some code", yes great, how is anyone meant to work out what
    is wrong if you keep that code secret?
    2) This group is for VB6 and earlier, try asking in a newsgroup for .NET

    microsoft.publi c.dotnet.langua ges.vb
    microsoft.publi c.dotnet.langua ges.vb.upgrade
    microsoft.publi c.dotnet.langua ges.vb.controls
    microsoft.publi c.dotnet.langua ges.vb.data
    microsoft.publi c.dotnet.genera l
    microsoft.publi c.vsnet.general

    Regards
    Dave O.

    <johndevlon@hot mail.comwrote in message
    news:1156409735 .496401.258480@ 74g2000cwt.goog legroups.com...
    Hi,
    Can someone please help me. I've got a strang problem in Visual Studio
    2005
    >
    I've created a windows application, using an MDI form and top menu.
    When a menu item is clicked, a new instance of a form appeirs.
    >
    At the same time, i'm disabling the menu item to prevent opening it
    again.
    >
    I've placed some code in the new form, so when it is closed, it should
    re-enable the menu item in the main MDI-form.
    >
    Unfortunately, the menu-item will not re-enable.
    >
    >
    john
    >

    Comment

    • Jeff Johnson

      #3
      Re: Problem re-enabling menu item

      "Dave O." <nobody@nowhere .comwrote in message
      news:Oz9yZw1xGH A.3492@TK2MSFTN GP02.phx.gbl...
      2) This group is for VB6 and earlier, try asking in a newsgroup for .NET
      Specifically, don't crosspost between .NET and non-.NET groups.


      Comment

      • johndevlon@hotmail.com

        #4
        Re: Problem re-enabling menu item


        Hi,

        I'm truely sorry for the mistake ...

        The code I'm using in the main form for opening the new for and
        disabling the menu item ...


        ViewMovieToolSt ripMenuItem.Ena bled = False

        Dim objForm As dataform
        objForm = New dataform
        objForm.MdiPare nt = Me

        objForm.Show()


        The code I'm using in the new form ...


        Private Sub dataform_FormCl osed(ByVal sender As Object, ByVal e As
        System.Windows. Forms.FormClose dEventArgs) Handles Me.FormClosed

        frmMain.ViewMov ieToolStripMenu Item.Enabled = True

        End Sub

        Many thanx

        John

        Comment

        Working...