Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Thu Dec 22, 2005 3:01 pm Post subject: Window Postition |
|
|
I can't get this code working:
| Code: |
if @greater(@mousepos(y),@fsub(%%screenY,4 )
WINDOW POSITION,Pixy,@fsub(@mousepos(y),40),@fsub(@mousepos(x),30),86,24
else
WINDOW POSITION,Pixy,@fadd(@mousepos(y),20),@fadd(@mousepos(x),10),86,24
end
if @greater(@mousepos(x),@fsub(%%screenY,4 )
WINDOW POSITION,Pixy,@fsub(@mousepos(x),40),@fsub(@mousepos(x),30),86,24
else
WINDOW POSITION,Pixy,@fadd(@mousepos(x),20),@fadd(@mousepos(x),10),86,24
end
|
I need a dialog that will, depending on its position, be above the windows taskbar, and also not be too far right of the screen. Am i making sense?
Eg. i the desktop is 1024 * 768, if the dialog is at postion 1000 * 740 it is visible, but if the user moves the dialog to 1024, i need it to go back to 1000 etc so that it is visable, and again with the 768 etc.
Nathan
* Must be the thought of santa coming, i can't explain myself  |
|
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Thu Dec 22, 2005 3:37 pm Post subject: |
|
|
It's for a special program, where the dialog follows the mouse !,
The dialog needs to be seen at all times, no matter where on the screen it is or what screen size you have.
So if you move your mouse far right, the dialog would not been seen.
Nathan |
|