BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dragging image onto another application

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
alavna
Guest





PostPosted: Sat Jul 01, 2006 7:49 am    Post subject: Dragging image onto another application Reply with quote



I have an TImage with a small bmp in it. Now I know how to drag this
image and drop it on another position in my form but how to drag it and
let it show outside my app? Actually I dont need to really drag it but
just to show it under the mouse pointer wherever that pointer is until
the OnMouseUp event.
I need this functionality to let users inform my app of the external
window they want to work with by dragging the image(they dont really
drag) and releasing their mouse over the external window client area.
You know spy+ of microsoft and its cursor that you drag over the window
of interest.
Note:I know you can get a handle to the window by simple using
getcursorpos and findwindow but just want to add an image to the....
thanks
Back to top
Peter Below (TeamB)
Guest





PostPosted: Sat Jul 01, 2006 4:56 pm    Post subject: Re: Dragging image onto another application Reply with quote



alavna wrote:

Quote:
I have an TImage with a small bmp in it. Now I know how to drag this
image and drop it on another position in my form but how to drag it
and let it show outside my app? Actually I dont need to really drag
it but just to show it under the mouse pointer wherever that pointer
is until the OnMouseUp event. I need this functionality to let users
inform my app of the external window they want to work with by
dragging the image(they dont really drag) and releasing their mouse
over the external window client area. You know spy+ of microsoft and
its cursor that you drag over the window of interest. Note:I know
you can get a handle to the window by simple using getcursorpos and
findwindow but just want to add an image to the.... thanks

When you set MouseCapture := true for the images parent you also get
control of the cursor image: if you change Screen.Cursor the modified
cursor will also be shown outside your own form, until the user lets go
of the mouse button. So the simplest way to achieve your end is to
create a cursor from your image, put it into a resource, load it at
run-time via LoadCursor, and store it into the Screen.Cursors array.

An alternative method would be to implement the drag side of OLE
drag&drop.

http://www.melander.dk ( http://users.on.net/johnson/delphi/ as
alternative)
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=14069
http://www.undu.com/LIBS/DnD.zip
http://www.undu.com/Articles/001108f.html
http://www.wideman-one.com/gw/tech/Delphi/dragdrop/
OLE Drag and Drop Components
http://www.unitoops.com/
http://www.raize.com

You may have to use the Wayback machine at www.archive.org for the Undu
references.

--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
Back to top
alavna
Guest





PostPosted: Sat Jul 01, 2006 5:29 pm    Post subject: Re: Dragging image onto another application Reply with quote



Thanks Peter
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.