gAlwaysIdle is a windows application which will add a menu item to Gtalk context menu.
(source: tothepc.com)
How can I do this to an application using vb.net or c#.net?
I don't think this is possible using .NET. gAlwaysIdle's website is down at the moment, but it most likely uses code/DLL injection to modify Google Talk's code at runtime and insert a menu item. This is only possible with native code (compiled) languages, which .NET languages aren't.
Edit: I found a download mirror and took a look at the application. It uses the SetWindowsHook method of DLL injection, which confirms my theory.