forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Window Postition

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Dec 22, 2005 3:01 pm    Post subject: Window Postition Reply with quote

I can't get this code working:

Code:

if @greater(@mousepos(y),@fsub(%%screenY,4Cool)
  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,4Cool)
  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 Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Dec 22, 2005 3:24 pm    Post subject: Reply with quote

why are you monitoring the position of your mouse if it is the position of the window you want to monitor?

perhaps using @WINPOS would be a better way to to make sure that it always stays within the monitor's range you specify by monitoring its top left coordinate together with its width and height

perhaps put your window position monitoring code in a TIMER loop?

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Thu Dec 22, 2005 3:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Dec 23, 2005 12:28 am    Post subject: Reply with quote

ok Smile

a thought ... instead of using FSUB, why don't you try @DIFF ... may be WINDOW POSITION does not like working with floating point numbers which i recall something about

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group