Context Menu problem

  • Thread starter Thread starter bole2cant
  • Start date Start date
B

bole2cant

You may be familiar with the MS "At the Movies" videos. One is called
"NotifyIcon". I have tried to create it (Is the code available for download
somewhere?) and have it completed except for a section where the guy says what
he is doing but it doesn't show in the video.

He says, "Now I'm going to take this ContextMenu that we just defined and
assign it to the ContextMenu property of the niRedLight."

How do I do that?

I went to the niRedLight properties and all I find is (None) at the ContextMenu
and I can't change it.
 
* "bole2cant said:
You may be familiar with the MS "At the Movies" videos. One is called
"NotifyIcon". I have tried to create it (Is the code available for download
somewhere?) and have it completed except for a section where the guy says what
he is doing but it doesn't show in the video.

He says, "Now I'm going to take this ContextMenu that we just defined and
assign it to the ContextMenu property of the niRedLight."

How do I do that?

I went to the niRedLight properties and all I find is (None) at the ContextMenu
and I can't change it.

Are you sure you added a contextmenu component from the toolbox to the
form? It will show up in the component tray below the form.
 
"Herfried K. Wagner [MVP]" wrote in message
Are you sure you added a contextmenu component from the toolbox to the
form? It will show up in the component tray below the form.

Herfried,

You were correct in your assumption that I had not added the contextmenu
component. I have now done that and named it cmContextMenu, and in the
niRedLight ContextMenu property it is shown as cmContextMenu.

But the context menu does not show when right-clicking on the red icon--all
that happens is the Form1 goes from visible to greyed out.

In the Windows Forn Designer generated code I have added the code:
Dim cmRedLight As New ContextMenu, then I .Add two items to cmRedLight.
(cmRedLight does not appear anywhere except in this Sub.

I'm thinking the problem now is just in using the right names in the right
places.

Any suggestions?

-Doug
 
Back
Top