FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to use hotspots?
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
How to use hotspots?
Posted: Tue Feb 28, 2006 04:25 PM

I seem to recall from some posting years ago that FiveWin has a way of implementing hotspots on top of a bitmap. But I don't remember how to do this and wonder whether this would work with the new transparent brush covering a dialog.

Can someone point me in the right direction, please?

  • Roger
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to use hotspots?
Posted: Wed Mar 01, 2006 07:35 AM

Roger,

There are several ways to do it:

  1. You may keep an array with subarrays containing the areas of the hotspots. When the mouse is clicked you search into those subarrays and fire a related action.

  2. Another way is to place a transparent control on top of the bitmap (i.e. a TBtnBmp or a TPanel) with brush NULL, so when it is clicked, its action its fired or its bLClicked codeblock.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
How to use hotspots?
Posted: Wed Mar 15, 2006 12:02 AM
Roger/Antonio;

Were you able to get any of these two approaches to work?

I'm dealing with the same situation. Have a timage control on a dialog and want to execute different code if clicked on different areas of the image. I'm trying with the tBmpBtn placed on top of the tImage control, but it is always visible no matter what. If ltransparent set to .t., then the bmpbtn displays as a black box.

Here the code I'm using:
	DEFINE DIALOG ::odlg NAME "xRayOrders" OF ::oWnd TITLE "Patient Xray Orders" BRUSH oBrush
	REDEFINE BTNBMP aoBtn[ 1 ] ID 101 OF ::oDlg NOBORDER ACTION oSelf:addXray( "Head" ) TOOLTIP "Head xRays"

	REDEFINE BITMAP oImage1 ID 100 OF ::oDlg FILE cPath + "Human_Front.jpg" //CURSOR oCursor //TRANSPARENT
	REDEFINE BITMAP oImage2 ID 200 OF ::oDlg FILE cPath + "Human_Back.jpg" //CURSOR oCursor //TRANSPARENT
	ACTIVATE DIALOG oSelf:oDlg CENTERED ON INIT oSelf:BuildXrayOrdersControls() ;
		Valid SaveBrwState( oSelf:oLbx, "XrayOrders" )


Any ideas?

Thank you,

Reinaldo.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to use hotspots?
Posted: Wed Mar 15, 2006 05:48 PM

Roger, Reinaldo,

Here you have a working sample:

http://hyperupload.com/download/3041ea2 ... t.zip.html

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
How to use hotspots?
Posted: Wed Oct 04, 2006 01:01 PM

Antonio

You can email this file for me in irochinha@itelefonica.com.br?

tanks.

Rochinha

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
How to use hotspots?
Posted: Wed Oct 04, 2006 02:12 PM

Mr.Antonio

Clicking on the HotSpots.zip link is resulting to "BAD URL".

Can you please upload it once again.

Thanks

  • Ramesh Babu P
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to use hotspots?
Posted: Wed Oct 04, 2006 05:13 PM

Rochinha,

We don't have it, sorry and it looks as the download url is broken.

maybe someone else has it and can help us.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
How to use hotspots?
Posted: Wed Oct 04, 2006 07:41 PM

I have uploaded a copy of hotspot.zip

http://hyperupload.com/download/023041e ... t.zip.html

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to use hotspots?
Posted: Wed Oct 04, 2006 08:24 PM

Gale,

Thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
How to use hotspots?
Posted: Thu Oct 05, 2006 12:20 AM

Good

Thanks to all!!!

Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
How to use hotspots?
Posted: Thu Oct 05, 2006 12:32 AM

??????

The file is empty!

:cry:

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
How to use hotspots?
Posted: Thu Oct 05, 2006 02:03 AM

Rochina,

>The file is empty!

Mine download wasn't. Try downloading it again.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
How to use hotspots?
Posted: Thu Oct 05, 2006 08:58 PM

Ohhhh yes!!!

thanks

Continue the discussion