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 : Wednesday, January 19, 2011 4:47:07 AM(UTC)
username77

Groups: Registered
Posts: 40

Thanks: 5 times

Hello

Im using WindowsFormApp in vb.net , LT v17

It's possible to move (navigate) on image by using the arrow keys (or combined ctrl + arrow Up/Down/Left/Right) in RasterimageViewer?

Best Regards
AN
 

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 : Wednesday, January 19, 2011 5:28:22 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Yes, you can move the image on the rasterImageViewer control by changing the rasterImageViewer1.ScrollPosition property value.
You need to change the rasterImageViewer1.ScrollPosition property value inside the rasterImageViewer.KeyUp event.
The code will be something as follows:
+----------+
private void Form1_Load(object sender, EventArgs e)
{
RasterCodecs codecs = new RasterCodecs();
rasterImageViewer1.Image = codecs.Load(@"C:\DelMe\OCR1.TIF");
rasterImageViewer1.KeyUp += new KeyEventHandler(rasterImageViewer1_KeyUp);
}

void rasterImageViewer1_KeyUp(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Up:                    
rasterImageViewer1.ScrollPosition = new Point(rasterImageViewer1.ScrollPosition.X, rasterImageViewer1.ScrollPosition.Y - 10);                    
break;
case Keys.Down:
rasterImageViewer1.ScrollPosition = new Point(rasterImageViewer1.ScrollPosition.X, rasterImageViewer1.ScrollPosition.Y + 10);
break;
case Keys.Left:
rasterImageViewer1.ScrollPosition = new Point(rasterImageViewer1.ScrollPosition.X - 10, rasterImageViewer1.ScrollPosition.Y);
break;
case Keys.Right:
rasterImageViewer1.ScrollPosition = new Point(rasterImageViewer1.ScrollPosition.X + 10, rasterImageViewer1.ScrollPosition.Y);
break;
}

rasterImageViewer1.Refresh();
}
+----------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Wednesday, January 19, 2011 6:55:49 AM(UTC)
username77

Groups: Registered
Posts: 40

Thanks: 5 times

Wonderful !

Thanks Maen.
 
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.084 seconds.