Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, December 11, 2006 5:01:58 PM(UTC)

twinsun  
twinsun

Groups: Registered
Posts: 2


I am using v14.5, and VB.NET

I want to drag & drop images from RasterThumbnailBrowser to
one of boxes of AxLTRASTERCONVIEWLib.AxLEADRasterContainerViewer.
How?  ContainerViewer doesn't seem to support drag and drop events.

If drag&drop is not possible, I want to at least intercept click event
on the ContainerViewer.  How?


 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, December 12, 2006 4:47:34 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)








There seems to be a limitation in Visual Studio .NET because
one of my colleagues tried in the past and could not get Drag Drop events to
work in a different ActiveX control. He found the following remark on Microsoft web site:
"The DragDrop event is not supported by the AxHost class."
This is the class that wraps the ActiveX controls when they are added to Visual Studio .NET
The source of the remark is: http://msdn.microsoft.co...stclassdragdroptopic.asp








To get click events, the following code sample causes
left-click mouse action to copy the image to a LEADRasterView OCX control on the same form.








































private void button1_Click(object sender, System.EventArgs e)
{
   LTRASTERIOLib.LEADRasterIO io = new LTRASTERIOLib.LEADRasterIOClass();
   LTRASTERLib.LEADRaster ras = new LTRASTERLib.LEADRasterClass();
   io.Load(ras, "c:\\temp\\11.jpg", 0, 1, 1);
   short i = axLEADRasterContainerViewer1.InsertCell(-1, 0);
   axLEADRasterContainerViewer1.Cell(i).InsertBitmapList(ras, true, 0);
   io.Load(ras, "c:\\temp\\ocr1.tif", 0, 1, 1);
   i = axLEADRasterContainerViewer1.InsertCell(-1, 0);
   axLEADRasterContainerViewer1.Cell(i).InsertBitmapList(ras, true, 0);
   if(!axLEADRasterContainerViewer1.OwnerAction(0).Use)
      axLEADRasterContainerViewer1.OwnerAction(0).ActivateAction(true, 0);
   axLEADRasterContainerViewer1.OwnerAction(0).SetMouseButtonAction(      LTRASTERCONVIEWLib.MouseButtonConstants.CONVIEW_MOUSE_BUTTON_LEFT,     (int)(LTRASTERCONVIEWLib.SetActionConstants.CONVIEW_ACTION_ACTIVEONLY
      | LTRASTERCONVIEWLib.SetActionConstants.CONVIEW_ACTION_REALTIME));
}
























private void
axLEADRasterContainerViewer1_MouseDownEvent(object sender, AxLTRASTERCONVIEWLib._ILEADRasterContainerViewerEvents_MouseDownEvent e)
{
   LTRASTERLib.LEADRaster ras;
   for(int i=0; i<axLEADRasterContainerViewer1.CellCount; ++i)
      if(axLEADRasterContainerViewer1.Cell(i).Select)
      {
         ras = (LTRASTERLib.LEADRaster)axLEADRasterContainerViewer1.Cell(i).BitmapListUnk;
         axLEADRasterView1.Raster.Bitmap = ras.Bitmap;
         axLEADRasterContainerViewer1.Cell(i).Select = false;
      }
}

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

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.090 seconds.