Setting a range

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2006
Posts: 1
Reputation: ColdPizzaSux is an unknown quantity at this point 
Solved Threads: 0
ColdPizzaSux ColdPizzaSux is offline Offline
Newbie Poster

Setting a range

 
0
  #1
Jan 29th, 2006
Hello, im interested in setting a range of pixles so that if an object is between a desired number of pixles the program responds, ive tryed

if shape1.top = 6000 to 8000 then

but to is not recognized, is there something i should be using in its place, thank you
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Setting a range

 
0
  #2
Jan 29th, 2006
it seems to me like you will need to calculate the height of the shape. So something like
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. if shape1.top = 8000 and (shape1.top - shape1.height) = 6000 then
  2. msgbox "yup"
  3. end if

But remember, it might be shape1.top + shape1.height, depending on how you are looking at it, because the screen starts 0,0 at the very top left and then gets bigger going down and to the right. Here is a program's source that I wrote for a friend of mine that lets him put the mouse in a given point on the screen, and while it's in that given area, it disables the screen saver
Attached Files
File Type: zip phantomspot_src.zip (60.2 KB, 1 views)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC