PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Problem re-enabling menu item

Reply

Problem re-enabling menu item

 
Thread Tools Rate Thread
Old 24-08-2006, 09:55 AM   #1
johndevlon@hotmail.com
Guest
 
Posts: n/a
Default 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

  Reply With Quote
Old 24-08-2006, 10:02 AM   #2
Dave O.
Guest
 
Posts: n/a
Default 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.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb.data
microsoft.public.dotnet.general
microsoft.public.vsnet.general

Regards
Dave O.

<johndevlon@hotmail.com> wrote in message
news:1156409735.496401.258480@74g2000cwt.googlegroups.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
>



  Reply With Quote
Old 24-08-2006, 02:03 PM   #3
Jeff Johnson
Guest
 
Posts: n/a
Default Re: Problem re-enabling menu item

"Dave O." <nobody@nowhere.com> wrote in message
news:Oz9yZw1xGHA.3492@TK2MSFTNGP02.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.


  Reply With Quote
Old 24-08-2006, 11:27 PM   #4
johndevlon@hotmail.com
Guest
 
Posts: n/a
Default 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 ...


ViewMovieToolStripMenuItem.Enabled = False

Dim objForm As dataform
objForm = New dataform
objForm.MdiParent = Me

objForm.Show()


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


Private Sub dataform_FormClosed(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

frmMain.ViewMovieToolStripMenuItem.Enabled = True

End Sub

Many thanx

John

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off