Image edit control in VB.NET

Posted on 2005-04-13
Medium Priority
Last Modified: 2013-11-13
Can anybody tell me how to get the X and Y coordinates using imageedit control in VB.NET
Question by:azhagang
  • 3
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 13771904
Please excuse my ignorance...but I am unaware of any "imageedit" control in VB.Net.

What control are you using?  Is it from  an external library or is it one of the default controls from the toolbox.

Do you need to get the X and Y coordinates when the mouse is clicked on is this control or are you looking for the width and height of the image contained in this control?


Expert Comment

ID: 13775508
Is this the control you are asking about? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/3rdparty/html/hidh_imgedit_contents.asp

If so, this msdn page has a list of properties amd methods (on the left).  If you're trying to figure out the location of the pointer, I can't help you there.  I saw properties for ImageHeight ImageWidth and ImageResolutionX.

Good luck.

Author Comment

ID: 13788066
Thanx for ur prompt reply.What I need is need to get the X and Y coordinates when the mouse is clicked on is this control .The control is from default controls from the toolbox.It is called Kodak image edit control(imageedit.ocx).Thanx in adcance

Expert Comment

ID: 13792508
Maybe the problem is that you are using an outdated image library?  I tried making a .net project to find some code that would do what you wanted but coulding find the library on my computer.  I googled for it but couldn't find any download.  Here is the link I found describing an alternative: http://vbnet.mvps.org/index.html?code/imageapi/mswaidll.htm

It has a link for Microsoft Windows Image Acquisition Library v2.0 and says "Kodak Imaging for Windows program and the related controls (ImgScan.ocx, ImgAdmin.ocx, ImgEdit.ocx, and ImgThumb.ocx) are not included with Windows XP."

I think in interest of compatability you may want to consider upgrading your library.  Otherwise, hoopefully someone else knows how to get the coordinates of the mouse over an object in .net.  Maybe theres a method that will work with any object.

Accepted Solution

arosboro earned 500 total points
ID: 13792538
http://www.startvbdotnet.com/forms/mouse.aspx describes how to collect coordinates on mouse down.  Perhaps you could incorporate a condition for if the mouse is over  your object when it goes down.  And if you want the coordinates over the image only, subtract the top and left distances from the edge of the form.

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn different types of Android Layout and some basics of an Android App.
Six Sigma Control Plans
Loops Section Overview

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question