473,954 Members | 43,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I create a Shell IDList Array in C# 3.5?

I am writing a file manager and I currently support simple, filename-
based, drag-drop. I'd like to create the appropriate Shell IDList
Array so that when a user drags a file into Paint or Photoshop or word
it will open correctly.

The research I've done points to "Shell IDList Array" but most of it
is determining how to accept and parse the CIDA, I'm looking for how
to build it and load the DataObject appropriatly.

Any help would be great.
Tom P.
Aug 11 '08 #1
2 3266
On 11/08/2008 in message
<dd************ *************** *******@r66g200 0hsg.googlegrou ps.comTom P.
wrote:
>I am writing a file manager and I currently support simple, filename-
based, drag-drop. I'd like to create the appropriate Shell IDList
Array so that when a user drags a file into Paint or Photoshop or word
it will open correctly.

The research I've done points to "Shell IDList Array" but most of it
is determining how to accept and parse the CIDA, I'm looking for how
to build it and load the DataObject appropriatly.
I put something up on Code Project which may help:
http://www.codeproject.com/KB/files/JFileManager31.aspx

There is a class in it called cDropFiles which takes a file path (or array
of file paths) and converts it/them into a DataObject which you can put on
the ClipBoard.

--
Jeff Gaines Damerham Hampshire UK
If it's not broken, mess around with it until it is
Aug 11 '08 #2
On Aug 11, 5:07*pm, "Jeff Gaines" <jgaines_new... @yahoo.co.ukwro te:
On 11/08/2008 in message
<dd43a071-ba60-4cff-b25e-cccd54de9...@r6 6g2000hsg.googl egroups.comTom P..
wrote:
I am writing a file manager and I currently support simple, filename-
based, drag-drop. I'd like to create the appropriate Shell IDList
Array so that when a user drags a file into Paint or Photoshop or word
it will open correctly.
The research I've done points to "Shell IDList Array" but most of it
is determining how to accept and parse the CIDA, I'm looking for how
to build it and load the DataObject appropriatly.

I put something up on Code Project which may help:http://www.codeproject.com/KB/files/JFileManager31.aspx

There is a class in it called cDropFiles which takes a file path (or array
of file paths) and converts it/them into a DataObject which you can put on
the ClipBoard.

--
Jeff Gaines Damerham Hampshire UK
If it's not broken, mess around with it until it is
Thanks, that was a big help. Now the problem I have is the code you
wrote creates DataObjects as memoryStreams but when I drop a file from
FileManager it gives me an array of strings.

I'll work on it and see what I can come up with. Thanks for the nudge.

Tom P.
Aug 12 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3383
by: eichin | last post by:
One of my recent projects has involved taking an accretion of sh and perl scripts and "doing them right" - making them modular, improving the error reporting, making it easier to add even more features to them. "Of course," I'm redoing them in python - much of the cut&paste reuse has become common functions, which then get made more robust and have a common style and are callable from other (python) tools directly, instead of having to...
7
2691
by: Oliver Gräser | last post by:
Hej, I want to run batchfiles via the Shell, but accessible in the Browser via IIS. Actually, I'd like the server to start a command line ntbackup if a users selects to do so on an ASP in his webbrowser. Does anyone know how to create a shell object in an ASP? Thanks,
22
2782
by: nobody | last post by:
hello everybody, is there a way of creating an array with help of a function that would accept the name of this array as a parameter and then create global Array type variable of that name? so that for example the following code would work as well in browsers as under Windows Scripting Host: str = "tableA";
11
4234
by: Paul D.Smith | last post by:
Can Python create a variable "on-the-fly". For example I would like something like... make_variable('OSCAR', 'the grouch'); print OSCAR; ....to output... the grouch
3
4338
by: JP | last post by:
I have an app that represents ShellFolder Items as a visual element (listview item, etc). The code correctly performs Drag&Drop operations EXCEPT in the case when the item being dragged is from a Virtual Folder. The problem is that the DragSource is my app, not the Virtual Folder, and therefore the IDataObject interface is clueless about how to get the data. My understanding is that I need to obtain and use the IDataObject Interface of...
0
2848
by: Andrea | last post by:
My C# application is a drop target for the drop format Shell IDList Array I have some problems actually getting the data. I was using the same code used for the FileDrop data target but I'm getting an exception. What's the correct way to handle this type of data? I receive an invalid cast exception. Here's my non working code Array droppedItemList = (Array) e.Data.GetData("Shell IDList Array");
2
2550
by: James L Szatkowski, PE | last post by:
I'm using (successfully in VB Express) this routine: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.microsoft.com", AppWinStyle.MinimizedNoFocus, True) Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.yahoo.com", AppWinStyle.MinimizedNoFocus, True)
5
1897
by: bearophileHUGS | last post by:
For array.array "B" means unsigned char, and such arrays accept to be initialized from (str) strings too, this is quite useful: But it seems such capability isn't shared with the append: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: an integer is required
3
5122
by: gisto moss | last post by:
i have to implement the shell such that it accepts commands, together with parameters. Assume all possible commands have either 0 or 1 parameter. I need to check this. if(commandstrings.length>2) {output error message and continue to the beginning of the loop} Note: the continue statement will skip all the following lines and go back to the beginning of the while loop. In the skeleton, commandLine=console.readLine(); reads in a command and...
0
10005
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11620
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10717
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9922
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8296
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7458
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6371
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4979
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3572
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.