|
Hi all,
I wanna do something like what is done by WinZip or WinRar programs.
when i rightClick any file i found My Menu item after copy & paste for example.
anyone know how to do such things in C#
thanks
plextoR
|
|
|
|
|
What you are talking about here is a Explorer Context Menu Shell Extension.
There are a series of articles written by Mike on how to do this using VC++. If you would like to do the same in C#, there is lot of work to be done. There is a technology sample that comes along with framework sdk, which would help you go about this thing.
Here are the links that could help
The following is one of the samples, but does not directly what you want, but gives you an understanding of things involved in writing one.
http://www.codeproject.com/csharp/dateparser.asp[^]http://www.codeproject.com/shell/shellextguide1.asp[^]
The sample from framework sdk
\FrameworkSDK\Samples\Technologies\Interop\Applications\ShellCmd
Hope this helps.
Cheers
Kannan
|
|
|
|
|
If you don't need the functionality of a COM shell extension then you could get away with some quick registry additions.
Add
HKEY_CLASSES_ROOT\Folder\shell\&Command To Display\command
and set (Default) to pathtoexe\program.exe
You can play with "'s and the command line arguments passed (%1) if needed.
This will display for any folder that's right-click on. You could instead add it under the HKCR\Directory tree or create your own association. It just looks for the shell & command keys.
|
|
|
|
|
Hi
Is there any way to create a control in C# and use it in non .Net (MFC 6) program?
thanks
|
|
|
|
|
Um... no.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Yes, but it isn't cut and dry and NOT supported by Microsoft (in the early beta's it was possible, but was later removed and now the only supported non-.NET host is IE).
Essentially you have to implement all the COM interfaces that a standard ActiveX control would implement. I believe there is an article here on CP which explains what you need to do, Exposing Windows Forms Controls as ActiveX controls[^].
You will probably have to do some conversions between the class names used in Beta 1 and the ones that made it into 1.0 (for example System.WinForms is now System.Windows.Forms and System.WinForms.RichControl is now System.Windows.Forms.Control or System.Windows.Forms.UserControl ).
James
- out of order -
|
|
|
|
|
It sounds like you would just have to implement the COM registry stuff yourself. MS probably pulled this feature to get away from having to support older systems and concentrate solely on a .NET push. After all activex is just an exe done in COM and it's rather easy to write com controls in assembly language once you see which registry entries + class interface methods are expected.
|
|
|
|
|
grv575 wrote:
MS probably pulled this feature to get away from having to support older systems and concentrate solely on a .NET push.
The response I heard was it was pulled because they didn't have time to test all possible permutations of how it would be used. By only supporting IE as the host, they had much less they needed to test/debug.
At the time they said the feature would be coming back later, after it could be tested. Who knows what Everett/v1.1 brings?
James
- out of order -
|
|
|
|
|
How do I find out which item is activated / doubleclicked in an ListView DoubleClick / ItemActivate event?
I guess I have to cast the EventArgs to something very clever - but what, and how to find out?
TIA
Peter
If I could find a souvenir / just to prove the world was here [sighist]
|
|
|
|
|
|
Use the GetItemAt method of the ListView passing in the current mouse position in client coordinates (you can get the position by the MousePosition static property of the Control class).
James
- out of order -
|
|
|
|
|
How can i run C#.NET applications on Linux?
Jassim Rahma
|
|
|
|
|
Well...
You can run the Shared Source Common Language Infrastructure[^] on FreeBSD and MacOSX.
However, for Linux, you're going to want to look at The Mono Project[^]
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
Hi, I need a way to find if the computer is connected to internet at the time my program runs on. Is there any?
karanba
|
|
|
|
|
|
Make sure your help notes include that. When using this application you must ping or connect to a website to make sure are connected.
There is an API that escapes me that tells if the machine has an active connection. You could also create a WebRequest and try attempting to connect to a well know site then have your application respond accordingly.
|
|
|
|
|
I believe the only api availiable for online status is for dialup connections. Won't help for broadband. The best solution is just to ping an outside server.
|
|
|
|
|
The same way the network status systen tray icon is updated when you log off or pull your network connection.
I just can't remember the function call now. I found it once for a project but never used it.
|
|
|
|
|
I think the API you are thinking of is 'InternetGetConnectedState' all part of the WinInet library
Technically speaking the dictionary would define Visual Basic users as programmers. But here again, a very generalized, liberal definition is being employed and it's wrong - just plain wrong - Tom Archer 5/12/02
|
|
|
|
|
Hello,
How to set the SystemTime ? GetSystemTime work but SetSystemTime don't work.
|
|
|
|
|
how to map a drive programatically ?
can any body tell ?
r00d0034@yahoo.com
|
|
|
|
|
Does C# and or .NET provide a function similiar to the WinAPI FindWindow or FindWindowEx methods?
|
|
|
|
|
If you simply lookup this forum, you'll probably find a dozen answers for this question.
Beyond that, why should there be anything like xxxWindow method or function call in the .NET API ? Have you heard or read about the "window" term in the .NET doc ? Answer : windows are hidden behind the FCL. You've got to get used to work without explicit windows.
|
|
|
|
|
The original question was
.Does C# and or .NET provide a function similiar to the WinAPI FindWindow or FindWindowEx methods?:
He was not looking for an exact one to one match. Your reply was both rude and unhelpful.
|
|
|
|
|
-you don't understand english
-you don't know what you are talking about
|
|
|
|