D&D onto ActiveX Control in a VB.NET Windows Application
From: andrea (mancio61_at_yahoo.it)
Date: 03/14/05
- Next message: Avi Shilon: ""Using Udp Services" example not working"
- Previous message: Freddyboy: "[C#][AddIN] How to obtain attributes in the current class ?"
- Messages sorted by: [ date ] [ thread ]
Date: 14 Mar 2005 01:11:56 -0800
Hi all, I've the following problem.
I'm developing a simple prototype of a VB.NET application that MUST
use an ActiveX Control ("must" in the sense that a .NET version of it
is still unavailable). I've inserted my control into the project
toolbox, and then I've created an instance of it in a WindowsForm.
Well, it works fine, and it renders its content very well. This ax
shows a workflow diagram, getting it from a remote server. I want to
add an object to this diagram, of a certain type and in a specific
position. So I need to identify an object type, and a point where the
object has to be created.
My application has a Listbar (like Outlook) containing a series of
buttons, each of one representing an object type (very similar to
Visio palettes).
I need to drag an object from Listbar onto the ActiveX control, and
trigger the D&D events. It's important to say that the "dragged data"
is only the string describing the object type. In my D&D event I wish
to make some code like (in pseudo-code):
public sub DragDrop(source as object, x as integer, y as
integer,.....)
dim sObjectType as String
sObjectType = source
'then I these info to call an external application.., I don't really
drop anything on the ax control, I use it to call the remote server,
if successfuly the server creates the object in the point x,y
bRet = remoteSrv.SendCommand("CreateObject", sObjectType,x,y)
if bRet = TRUE then me.axCtl.Refresh
end sub
OK, now here's the problem:
the ax control, if inserted in a VB6 form, expose the standard D&D
events (DragOver, DragEnter, DragDrop, etc). Instead, once inserted in
a WindowsFrom, these events are not present.
I remember (but I could be wrong) that these events are provided by
the container and not by the control itself. How can I intercept D&D
action in my case? Does exsit any chance to do it, or I have to wait
(at least one year....) the .NET version of the control?
I try to encapsulate my ax control into a real .NET control, setting
dock property to Fill. The User control expose the needed events, but
I don't understand if there's a way to trigger them.....
Any ideas and/or suggestions?
Grazie from Italy
Andrea
- Next message: Avi Shilon: ""Using Udp Services" example not working"
- Previous message: Freddyboy: "[C#][AddIN] How to obtain attributes in the current class ?"
- Messages sorted by: [ date ] [ thread ]