Done!. Now I have my VBapplet in system try with a simple menu to enable-disable the usage of the com port and to shutdown the program. No ocx required!, just a module, a couple of functions and a "tricky" menu! Thank's Best Regards, Dennis. ----- Original Message ----- From: "Ian McLean" To: Sent: Wednesday, November 12, 2003 10:04 AM Subject: Re: ] VB-Right Click-COM1 > Hi Dennis, > > IMO, not directly in standard VB because it involves the use of the windows > message queue. This functionality is usually performed on icons loaded into > the SysTray area of the taskbar. The shell needs to know where to send the > mouse messages, etc. back to your application, i.e. it uses a callback > function. In VB, this sort of windows functionality is usually achieved > using a COM object with events, and I don't believe an ActiveX interface is > provided for this in the standard VB package. In API terms, it involves > filling out a NOTIFYICONDATA structure and passing it to an API function > Shell_NotifyIcon. You pass it what you are trying to do, add an icon, > delete an icon, create a shortcut menu (what your after), etc. You also > pass the address of your callback function (i.e. message queue) within the > structure and windows will callback your application passing the event > notification in lParam and wParam. Very much a C thing unfortunately. Feel > like wrapping up this functionality into an OCX ? Alternatively you may > find someone elses OCX solution for this on the Web. > > Have a look at http://www.programmersheaven.com/ for starters. I don't know > whether a specific OCX control is available for this, but it might be a good > place for you to start. > > Hope this helps. > Rgs > Ian. > > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Dennis Crawley > > Sent: Wednesday, 12 November 2003 10:25 pm > > To: PICLIST@MITVMA.MIT.EDU > > Subject: [OT:] VB-Right Click-COM1 > > > > > > Visual Basic Application. > > When a window is minimized, an icon is displayed over the task bar. > > Is it possible to right click this icon and deploy two or > > three menu items > > other than the default? > > > > I want to shutdown com1 on this applet without open the entire window. > > If it is possible I will suggest this method to Microchip. > > I share com1 with a 3-position switch. > > I read somewhere about insert the icon > > > > Regards > > Dennis. > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu