Context Menus

A

Ash Phillips

Hi, in VB6, I could use PopupMenu() to display a menu on a control such as a
list view.

I have tried setting my List View in VB.NET to a ContextMenu but I can't get
the same functionality that I had and need like in VB6.

Basically, I just want to disable menu items in the context menu if there is
no item in the List View selected.

Also, on the subject, in VB6 there was lvwListView.ListItems.SelectedItem -
I see "SelectedItems" in VB.NET and it doesn't seem to work at all?

Thanks in advance :)

Ash
 
A

Ash Phillips

Anyone? :S


Ash Phillips said:
Hi, in VB6, I could use PopupMenu() to display a menu on a control such as a
list view.

I have tried setting my List View in VB.NET to a ContextMenu but I can't get
the same functionality that I had and need like in VB6.

Basically, I just want to disable menu items in the context menu if there is
no item in the List View selected.

Also, on the subject, in VB6 there was
lvwListView.ListItems.SelectedItem -
 
A

Ash Phillips

Can someone help?!?

I am desperate to solve this issue :'(


Ash Phillips said:
Hi, in VB6, I could use PopupMenu() to display a menu on a control such as a
list view.

I have tried setting my List View in VB.NET to a ContextMenu but I can't get
the same functionality that I had and need like in VB6.

Basically, I just want to disable menu items in the context menu if there is
no item in the List View selected.

Also, on the subject, in VB6 there was
lvwListView.ListItems.SelectedItem -
 
C

Cor Ligthert

Ash,

And it is so simple,

I tell it in the most simple way

Drag a contextmenu from your toolbox to your form
Set the items as in a normal menu, you first select the contextmenu icon on
your form for that.

Set in your listview property contextmenu the name of that contextmenu using
the designer.

Done

I hope this helps?

Cor
 
A

Ash Phillips

I know that - that's not what I want...

If you re-read my original post, you'll see what I mean.
 
C

Cor Ligthert

Hi Ash,

I think I can understand what you mean, however this is a VBNet newsgroup so
tell what you want and not what was it is in VB6. Than mostly you have a
quick answer. Now I spent maybe time while it is all the time a little bit
else than you want.

For VB6 to VBNet problems is the newsgroup

microsoft.public.dotnet.languages.upgrade

When you want to tell your question referencing to VB6, than is maybe that a
better place to ask your question.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top