Thanks!
Peko
(branko....@sb.tel.hr
SendMessage(FindWindow('Progman', 'Program Manager'), WM_HOTKEY,
5,4587528);
For the FIND Computer:
SendMessage(FindWindow('Progman', 'Program Manager'), WM_HOTKEY,
6,4587530);
HTH
Best regards, Steffen
there is a full range of file management functions both in Delphis
run-time lib and the Windows API. Look at CopyFile, MoveFile (both
Windows, win32.hlp), DeleteFile (Sysutils or Windows), ShFileOperation
(ShellAPI, win32.hlp). To search for files you use FindFirst, FindNext,
FindClose (all Sysutils). One of the example programs that comes with
Delphi (filmanex) is a simple file manager that shows how to handle this
kind of file operations.
Peter Below (TeamB) 10011...@compuserve.com)
No replies in private e-mail, please, unless explicitely requested!
--
Wed, 03 Feb 1999 10:39 EST
Jim O'Brien, UnitOOPS Software unit...@remove-this-prefix.unitoops.com
Check out our OLE Drag and Drop Components at <http://www.unitoops.com/>
Browse examples online at <http://www.unitoops.com/uoole/examples/>
> > Hey everyone... I was wondering... How can you copy/paste/cut files on
> >
>
> Does anyone know of a better way to do this? Using components to do this
> is not very convinient.
>
If you read the example, you'll see it doesn't even require the components. It shows, using some
well-commented code, how to go about doing file and shortcut clipboard operations, and supplies
(through the uoUtil unit that accompanies the trial and full versions of the components) a routine
to make it easier to construct the two data structures expected by the clipboard. You can use
this routine freely even if you don't license the components, but you don't even have to use it if
you don't want to. In other words, *you don't have to use components to do this*.
>Unitoops are not very fast for such tasks!!!
>
I have *NO* idea what you mean by this. Can you please explain to everyone? It looks like you're
suggesting our product is deficient in some way, but you offer no description of what you think is
wrong. In fairness to all, but in particular to us, you should elaborate on this. Or is your
comment something akin to "hammers are not very fast for cutting planks?"
--
Thu, 04 Feb 1999 07:45 EST
>"hammers are not very fast for cutting planks?"
Sure they are...if they're big enough.
-Steve
Dejan.
Ehem... Are you serious?
Unless you are planning to cut/copy/paste thousand of files
simultaneously per second, I can't really see the overhead we are
talking about having *any* relevance at all.
The overhead for wrapping an API call will usually be about 10-20
instructions, which will probably account for less than .5% of the
instructions executed by the API call itself. The memory overhead can
of course vary greatly, but it isn't more than 50-100 bytes for simple
classes.
Now, why don't you tell us what your *real* problem is?
Thank you for flying Air Melander.
+--------------------from usenet----------------------+
| Anders Bo Melander | Phone: (+45) 38 87 91 26 |
| Finsensvej 79, 2. tv. | mailto:and...@melander.dk |
| DK-2000 Frederiksberg | http://www.melander.dk |
| Denmark | flameto:bi...@microsoft.com|
+------------------------+----------------------------+
Dejan.
In order to implement any of the standard interfaces (whether for drag and
drop, shell context menus, etc, etc) in the WinAPI, you have to write your own
code. This is the essence of the *component* object model (COM). Wrapping the
implementation of those COM interface (that you'd have to write regardless of
the language you were using) in a VCL component for convenience is just another
layer.
The performance impact is not even an issue.
> Besides, whenever there was a question about how to copy/cut/paste
> files the only answers were "use UnitOops", and this is the winapi
> newsgroup
>
Not so. I pointed you to an example, fully commented, that doesn't require ANY
components.
--
Fri, 05 Feb 1999 07:24 EST
--
Fri, 05 Feb 1999 07:49 EST
But either way, this is rarely an issue even outside of drag and drop.
--
Fri, 05 Feb 1999 07:50 EST
Don't you think it is just a bit sleazy of you to
suggest someone look to an example that REQUIRES
YOUR PRODUCT, to do something like this?
Do you know what the meaning of the term 'commercial
exploitation' is?
How about clearly marking your sales pitch in-disguise
to make it clear that it is not a pointer to generic
example code, but in fact, nothing but a sales pitch.
The example DOESN'T REQUIRE OUR PRODUCT. It contains COMPLETELY GENERIC CODE
for clipboard operations involving files, aside from one or two helper
functions that you can either use FOR FREE from our support library, or write
your own. From the web site description of this example:
"Demonstrates manipulating "fancy" clipboard formats using the helper functions
in the uoUtil unit. While this is not directly related to drag-and-drop, the
universal data transfer mechanism underlies both, so there are many concepts in
common. We show the specific example of putting file names in the clipboard so
that the shell (Explorer) will offer the choice to paste them, or paste them as
shortcuts. The converse - getting file names from the clipboard, put there by a
copy operation in the shell - is also demonstrated. "
In a posting 2 days before your attack, I had even explained at length that
this clipboard stuff had no requirement for our components. DIDN'T YOU READ
THAT ONE?
Finally, if you look at any prior responses where I mention a solution that
requires or is aided by our product, I ALWAYS SAY SO EXPLICITLY. I even point
out certain workarounds where NO THIRD-PARTY COMPONENTS ARE REQUIRED. And by
the way, I respond to questions in LOTS of areas COMPLETELY UNRELATED TO OUR
PRODUCTS. Ask anyone who frequents these groups.
There. I feel a bit better now. You probably will, too, after you tone it
down a bit. I'd also appreciate a retraction of your off-the-mark loose-cannon
post that could undeservedly damage my reputation, not to mention my business,
in the eyes of the casual reader.
--
Sat, 06 Feb 1999 14:06 EST
LOL! You don't change.
Perhaps if you read the rest of the thread you might have noticed that
there is no requirement to use Jim's component - he was offering a free
source code solution.
Mike Orriss (m...@3kcc.co.uk)
http://www.3kcc.co.uk/notetree.htm
Ivan Pekarik wrote:
> Hey everyone... I was wondering... How can you copy/paste/cut files on
> any drive from within a Delphi app? Do you maybe know a way to search
> the hard drive for a file (something like the Windows Find program).
>
> Thanks!
>
> Peko
> (branko....@sb.tel.hr
Look guys, I appreciate all the cool ideas and stuff, but you dont have to
make a war zone here. You all have different methods, and I don't care
about those 5% here or 5% there, I don't care if it's faster or slower
than 3.0684872 seconds and I dont care if it has three or three hundred
lines of code, as long as it works. We're all on the same side here! All I
wanted to do is to learn something about the file managment in Delphi (I
wanted to make a simple File Manager). I'm not very good at making
programs in Delphi, so I thought I could use your help. I'm sorry if I got
you fighting. SO PLEASE STAY COOL!!!
Thank you!
Peko
--
Sun, 07 Feb 1999 16:24 EST