944,167 Members | Top Members by Rank

Ad:
Jan 29th, 2006
0

Setting a range

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ColdPizzaSux is offline Offline
1 posts
since Jan 2006
Jan 29th, 2006
0

Re: Setting a range

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, 7 views)
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Help Using Visual Basic Timer
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: progress bar problem in vb





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC