[2005] Implementing a COM control in vb .net
I'm interested in interacting with the shell. In windows 2000 and windows xp up to sp2, you could put an address bar on the taskbar. I use this feature frequently to run commands, start programs, load files by name, etc. I understand that sp3 removes this functionality.
I'm interested in writing a new version of the address bar that will dock to the taskbar as a Desk Bar. I understand that you have to be able to write it as a COM control and register it a certain way.
.Net lets you make classes visible to COM, but can you make an actual COM control with vb.net?
Re: [2005] Implementing a COM control in vb .net
I believe you can add the neccessary interface and method descriptor within your classes to expose them to COM, but no you could never make a true COM component from .Net - with the possible exception of using unmanaged C++, but certainly not with VB.
Why just out of interest would you have to use COM for this? It is possible to use Win32 API calls from a .Net application to position your application on screen and keep this as a .Net app (which could then be added to the start menu startup folder or the registry to load upon startup of each logon upon the computer)..
Re: [2005] Implementing a COM control in vb .net
See this MS link
http://msdn.microsoft.com/en-us/library/bb776819.aspx
Also, there were some other threads on this in this forum. Try a search for more.
Re: [2005] Implementing a COM control in vb .net
The Shell_NotifyIcon API call will let you add your app to the system tray, and the SHAppBarMessage API call will let you add your app to the start menu taskbar.
For more help with API's, you can use this site: http://allapi.mentalis.org/apilist/
Re: [2005] Implementing a COM control in vb .net
Ohh ok - or you should just go ahead and use Rob's link there. :thumb:
That's pretty cool Rob, never seen that one before! <bookmarks page>
Re: [2005] Implementing a COM control in vb .net
Thanks :) I've been wanting to work on those for a long while now. No time available to take away from posting :D Maybe a VBF post formatting utility or something.
Re: [2005] Implementing a COM control in vb .net
Quote:
Originally Posted by alex_read
The
Shell_NotifyIcon API call will let you add your app to the system tray, and the
SHAppBarMessage API call will let you add your app to the start menu taskbar.
For more help with API's, you can use this site:
http://allapi.mentalis.org/apilist/
This wasn't quite what I was looking for, but this fulfills the need nicely. It's also something I was looking for a while back for a different project.