| View previous topic :: View next topic |
| Author |
Message |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 10:02 am Post subject: When mouse over do ? |
|
|
I want to do so my application fades when im not having the mouse over it.
Then i want it to become normal when the mouse is over it.
Possible? I tried searching google, but i really didn't get any results i could use..
Language is Delphi.
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Wed Sep 19, 2007 10:09 am Post subject: |
|
|
| You can make a thread, use GetCursorPos in it and check if it's on your form.
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 10:12 am Post subject: |
|
|
| explain a little more please...
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Wed Sep 19, 2007 10:21 am Post subject: |
|
|
| Use GetCursorPos API to get the mouse position on the screen. Then, find your form's position on the screen, and check if the mouse is on it.
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 10:23 am Post subject: |
|
|
Sorry, i havent been into delphi for quite some time...
Could you explain how i can do this ? probably with some example code, but not needed ...
i will +rep you if you can help me throught this
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Wed Sep 19, 2007 10:54 am Post subject: |
|
|
well i dont get the question but anyway ....
| Quote: |
var
P1:bool;
m1:tpoint; |
make a label and on "mouse move" add this
| Quote: |
if(P1) then
begin
getcursorpos(m1);
label4.caption:=format('(%d,%d)',[m1.x,m1.y]);
end;
|
Mouse Down (the same label)
Mouse up (the same label)
then to use the funcition
add to exampel a button or something
| Quote: |
setcursorpos(m1.x,m1.y);
|
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Wed Sep 19, 2007 11:36 am Post subject: |
|
|
put AlphaBlend true and use OnMouseLeave and OnMouseEnter events with this codes:
for OnMouseLeave: | Code: |
repeat
form1.AlphaBlendValue:=form1.AlphaBlendValue-1;
until form1.AlphaBlendValue =130;
|
and for OnMouseEnter: | Code: |
repeat
form1.AlphaBlendValue:=form1.AlphaBlendValue+1;
until form1.AlphaBlendValue =255;
|
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 12:07 pm Post subject: |
|
|
| Nothing called OnMouseEnter or OnMouseLeave??
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Wed Sep 19, 2007 12:23 pm Post subject: |
|
|
| check form actions...
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 12:30 pm Post subject: |
|
|
??
You mean form Events?
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Wed Sep 19, 2007 12:31 pm Post subject: |
|
|
| yep
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 12:32 pm Post subject: |
|
|
| Nope ... nothing called that. Im using Delphi Enterprise 7
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Wed Sep 19, 2007 1:31 pm Post subject: |
|
|
well i dont get the things ...
fades ? what does it mean ?
when the mouse leav the form then change color or something ?
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Sep 19, 2007 1:45 pm Post subject: |
|
|
Fade ...
Uhm you know when something is becoming slightly more and more visible ?
|
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Wed Sep 19, 2007 2:29 pm Post subject: |
|
|
Call TrackMouseEvent
Ask for TME_LEAVE in the struct.
Handle the WM_MOUSELEAVE message.
_________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
|