| View previous topic :: View next topic |
| Author |
Message |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Fri Jul 25, 2003 12:13 am Post subject: Mouse Over Bitmaps |
|
|
how can i make the staus bar say i am over a bitmap or not... like i have "hotspots" on the dialog and want to display text in the stais...like "town of trimogle" yes this is for a game... so any help would be nice.. tahnk you
Will |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Jul 25, 2003 12:51 am Post subject: |
|
|
There are a few mouse over examples in the "Examples" section of the
main site.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Mon Jul 28, 2003 4:42 am Post subject: |
|
|
| Ok.... i have been looking and there is nothing i can find about bitmaps... and mouse over the way i want.... they have buttons and all..... they all have a hand style so i know its possible to find out when its over a particular bitmap.... so how can i do this? i want to know when my mouse is over town_1 bitmap and then some other bitmap... |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Jul 28, 2003 5:14 am Post subject: |
|
|
I don't have any code on hand but you need to check the @mousepos and then see if the mouse position is within the top,left,width,height area of your bitmap image. Note that the mousepos is relative to your entire desktop so you also need to get the position of your dialog/form as well.
There may be some api's available to make this alot easier for you; anyone have any ideas on api's for this? Or CR could add in a mouseover style for images directly into VDS.
Another alternative is the vdsobj dll provides a mouseover event for the GRAPHIC object. A GRAPHIC#ONMOUSEOVER event is auto triggered when you place the mouse over the image.
You can also search www.vdsworld.com for 'mouseover' and you'll see a few example scripts on how to do what I was talking about in the first paragraph above.
Last edited by PGWARE on Mon Jul 28, 2003 5:18 am; edited 1 time in total |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jul 28, 2003 5:18 am Post subject: |
|
|
[This one uses vdsdll]
http://www.vdsworld.com/vdsscript.php?url=downloads/script/GT-HotSpotExample.dsc
There's one example, but it uses the vdsdll. If you're using VDS 4 or 5,
you can change it to use plain vds instead.
The other example I was thinking of I can't seem to find on the site.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Jul 28, 2003 7:10 am Post subject: |
|
|
The whole problem i feel is the way VDS draws the bitmaps. Anyway here is a work around. Just put aniicon elements of the same size(dont link any ani files) as your bmp over the bmp(that means a line above the corresponding BMP) and detect using winatpoint under a timer. The result is absolutely clean and flicker free. You can also change the cursor to hand if over the bmp if U want it.
There are other ways but i think this is simplest.
Download the script + BMPs from here.
"http://www.geocities.com/codescript2002/Mouseover.zip"
You can put tiny tiny Aniicons to create as many hotspots as U want !.
I am thinking of a nice map demo based on this.
Please let me know the result, I have tested on WInXP only.
If the BMP is not seen USE tranaparent style for ANIICON(Unlikely)
EDIT:
Works on Win9x too.
In VDS 4.x use transparent style to your aniicon element. BTW Please note that VDS 5.x already includes a mouse over style ! But for VDS 4.x you can use this. It wont work for VDS 3.x or 2.x as they dont have aniicon element i think. You have not mentioned your VDS version 4.x I hope ! .Some flicker does occur in VDS 4 that is related to refreshing the aniicon and I dont think you can overcome that.
Regards _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|