Results 1 to 7 of 7

Thread: [2005] Implementing a COM control in vb .net

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662

    [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?

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    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)..

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    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/

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  5. #5
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2005] Implementing a COM control in vb .net

    Ohh ok - or you should just go ahead and use Rob's link there.

    That's pretty cool Rob, never seen that one before! <bookmarks page>

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 Maybe a VBF post formatting utility or something.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width