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 : Tuesday, January 31, 2006 4:04:37 AM(UTC)

urkoman  
urkoman

Groups: Registered
Posts: 3


hi!

I would like to add/select/remove zones with mouse.

How to add a zone I just found out, but how to select existing zone
with mouse click is "mission impossible" for me. Can you please provide code sample for that?

Is it possible to set a name for a zone which should be visible on zone edge?

some more problems:
How to check if there exists SelectedZone? Otherwise .SelectedZone function returns error!
Is it possible that more that one sone is selected? How to get that array?
Is it possible UNSELECT zone with mouse click? SelectZoneByPoint only select zone.


Why .DrawPage function draw also Zones which are already deleted? I'm
using .DrawPersistence = True switch and drawing page on LEADRasterView object.

and some more:
How to tell .Recognize funtion to regognize data only from selected zone?

I'm using VB6.0.
 

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, January 31, 2006 10:59:02 PM(UTC)

urkoman  
urkoman

Groups: Registered
Posts: 3


I just found out how to select zone. Of course with SelectZoneByPoint
Existing question: Is it possible to set a name for a zone which should be visible on zone edge?

But I found some more issues, which I cannot solve.


1. There is function SelectZone with last parameter bSelect. If I put there False, all the zones are still selected. So how to DESELECT zone?

2. How to move zone with mouse?


 
#3 Posted : Wednesday, February 1, 2006 11:48:17 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,
    
About setting a name for each
zone and show it on zone edge, there is no direct way to do this. You
may try to implement this by drawing the name of the zone as text on
the position that you want. You can draw text by using DrawText method (ILEADRasterFXD).


(1) Do you mean that when call the SelectZone method with the bSelect
parameter false, all zones get selected? Please provide me with more information about this issue?

(2) You may try to use the UpdateZoneArea method (ILEADRasterDocument), which updates the specified zone area.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#4 Posted : Thursday, February 2, 2006 4:01:42 AM(UTC)

urkoman  
urkoman

Groups: Registered
Posts: 3


hi!

about .SelectZone issue:
I would like to select/deselect zone with mouse click or manually.
So when I click into selected zone I would like to deselect it and vice versa.

So "problems" is:
- when I click in one of the zones it becomes selected (small rectagles in the corners)
- when I click in other both zones looks like they are selected; small rectagles in the corners exists on both
- so how to "deselect" first zone?
and more:
- when I delete zone, it is still visible on LeadRasterView object, but with different color

So how to redraw page with right zones select status? Probably is the problem because we are using Class Modules in VB6 and there should be something wrong with references, but why something works OK?!

And still existing problems:
- How to get rid of message dispalyed if function .SelectedZone is called, but no zone is selected?
- Is it possible to more that one zone is selected? Like more files in Windows Explorer. Do I need to make my own zone list?
- Is it possible to UNSELECT zone with mouse click? Inverse function to .SelectZoneByPoint
-
How to tell .Recognize funtion to regognize data only from selected zone?
-
How to move zone with mouse?




 
#5 Posted : Tuesday, February 7, 2006 1:33:06 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

You need to call this:
ILEADRasterDocument.SelectZone(pRaster, hDC, iPageIndex, iZoneIndex, FALSE)
Where iZoneIndex is the zone you want to de-select.

This means if you want to
de-select ALL zones other than the clicked one, you must loop through them all and call the function for each one.


About zone removal, I tried it
in our main VB COM OCR demo and removed a zone and it did not stay
displayed. Did you try to refresh the display after removing? However,
please check the demo code and see how the remove zone implemented in the demo.


About other problems:
- How exactly is the message displayed (which code causes it)?
- You can select/deselect any zone you want like explained above.
- To UNSELECT zone with mouse
click and other operations, they all can be done using
ILEADRasterDocument.SelectZone like explained above. If you want to do
the same thing to multiple zones (or all zones), you need to loop through them.

- To tell .Recognize function
to recognize data only from selected zone, remove all zones (using
loop) and then add one zoon (add the zoon that you want to recognize) to the page, and call the recognize function.

 - To move zone with mouse, use mouse coordinates in mouse events, and apply them to zone rectangle.
In other word, you can select
the zoon using the mouse by using the SelectZoneByPoint, and then call
the SelectZone with bSelect parameter set to FALSE for the zone that
you want (send the zone index that you want to de-select to the SelectZone function)


Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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.198 seconds.