Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Picture with 'ready to click places'?

Posted on 2000-03-21
8
Medium Priority
?
250 Views
Last Modified: 2010-04-04
I have a picture in TImage and I want to make on him some places where 'onmouseover' change the cursor and when I click on it, it will open another picture in TIMAGE.
I know I can do it as more TIMAGEs and on every I want I can write onmouseover proc. Is there another way?
0
Comment
Question by:neox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:jeurk
ID: 2641277
If you want that I can send it to you :
==============================
 Component THotImage ver 2.12
==============================

Allows creating 'Hot Spots' on target image

THotImage derived directly from TImage,
thus have all features of ascentor+ additional events/properties.
There is also visual property editor for editing HotSpots property.
Mask Actions added. When mouse goes over or down at hot area
"spot" part of image can be replaced by part of MaskPicture


Delphi's version supported: D2,D3,D4
0
 
LVL 2

Expert Comment

by:kotik
ID: 2641280
It's only a suggestion, try this:

var
  Position: integer;
begin
  SendMessage(RichEdit.Handle, EM_POSFROMCHAR, Position, 0
);
end;

Regarding to the Win32 Help:
A returned coordinate can be negative if the character has been scrolled outside the edit control's client area.

So you can get abs(Position) to get the real offset.

Regards,
Kot.

0
 
LVL 2

Expert Comment

by:kotik
ID: 2641284
Sorry, this comment is for another question.

Regards,
Kot.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Expert Comment

by:jeurk
ID: 2641303
0
 

Accepted Solution

by:
Rubbie earned 20 total points
ID: 2642074
You can annalyze the position of the mouse cursor in the OnMouseMove event, and change the cursor accordingly.
For example, if you have a hotspot at position top:50, left:50 in your image and the hotspot is a square 10x10 you can write in the procedure for the OnMouseMove event:

if (X > 50) and (X < 60) and (Y > 50)   and (Y < 60) then Image1.Cursor:=crHandPoint
else Image1.Cursor:=crDefault;

You can have whatever you want cursor at different hotspots. Then, on the OnMouseDown event write the code you want, checking the coordinates where the user clicked.
0
 
LVL 4

Expert Comment

by:jeurk
ID: 2643921
Hi,
This is what the component is doing for you.
Sometimes you may have very complex regions.
This will be a real pain to handle.
0
 

Author Comment

by:neox
ID: 2644634
ok, thank u all!!!
 neoX:-)
0
 
LVL 4

Expert Comment

by:jeurk
ID: 2729894
hello neox,
Maybe you coul accept or reject the question.
What did you used to solve your problem.
this you used my component or did you do like rubie says ?
a thank U is great, but we also want the points...
Thanks.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

730 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