@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Exposes methods that show, hide, and query deskbands. !!!!C# Definition: [ComImport, Guid("6D67E846-5B9C-4db8-9CBC-DDE12F4254F1"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface ITrayDeskband { [PreserveSig] int ShowDeskBand([In, MarshalAs(UnmanagedType.Struct)] ref Guid clsid); [PreserveSig] int HideDeskBand([In, MarshalAs(UnmanagedType.Struct)] ref Guid clsid); [PreserveSig] int IsDeskBandShown([In, MarshalAs(UnmanagedType.Struct)] ref Guid clsid); [PreserveSig] int DeskBandRegistrationChanged(); } !!!!VB Definition: <ComImport> _ <Guid("TODO")> _ 'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch Interface ITrayDeskband TODO End Interface !!!!Sample-Code: ITrayDeskband obj = null; Type trayDeskbandType = System.Type.GetTypeFromCLSID(new Guid("E6442437-6C68-4f52-94DD-2CFED267EFB9")); try { obj = (ITrayDeskband)Activator.CreateInstance(trayDeskbandType); Guid deskbandGuid = {SomeDeskbandGuid} obj.DeskBandRegistrationChanged(); hr = obj.ShowDeskBand(ref deskbandGuid); if (hr != 0) throw new Exception("Error while trying to show deskband: " + hr); obj.DeskBandRegistrationChanged(); } catch (Exception e) { MessageBox.Show(e.Message); } finally { if (obj != null && Marshal.IsComObject(obj)) Marshal.ReleaseComObject(obj); } !!!!Notes: Guid {E6442437-6C68-4f52-94DD-2CFED267EFB9} leads to the correct TrayDeskband object. * Modified the interface for the COM, I don't know much about it but that's what got it to work for me. The [In, MarshalAs(UnmanagedType.Struct)] may be unnecessary but the 'ref' keyword in the interface and when passing in the variable made it work otherwise I got a corrupt memory pointer exception message. Documentation: ITrayDeskband@msdn on MSDN
Edit Interfaces.ITrayD...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.