|
-
November 2nd, 1999, 07:45 PM
#1
How to ......
How to make invert this code:
x = Picture1.Height
x = 0
Do Until x >= 4700
x = x + 1
me.Refresh
Picture1.Height = x
Loop
so that it will scroll from bottom to top not from top to bottom
Thank You
-
November 2nd, 1999, 09:39 PM
#2
Re: How to ......
If you are doing something like that, it is probably better to use a timer than a do loop, but the idea is the same. I think the visual effect you will get is that it cuts off from the bottom up. You would initiate the value of X like you have written at x = Picture1.Height, then in your do loop decrement x by one, x=x-1. and set the condition to loop until x = 0.
Sky1000
-
November 3rd, 1999, 05:12 AM
#3
Re: How to ......
Simple.
Just use the TOP and LEFT member variables to set the upper left position of
your control coninuosly, i.e.
dim lngX as long
dim lngY as long
dim lngXSize as long
lngXSize = 0
while lngXSize <= 4700
lngXSize = lngXSize + 1
lngX = 0
lngY = 0
picture1.top = lngY
picture1.left = lngX
picture1.height = lngXSize
me.repaint
wend
-
November 3rd, 1999, 02:54 PM
#4
Re: How to ......
hmm, PedroD? your code does the same function as mine, but I need to reverse it and your code seem to do the same thing --- from top to bottom but I need to go from BOTTOM to TOP and so that upper part was moving and lower part (base) would remain still...that's what kind of progress bar I need
-
November 4th, 1999, 03:05 AM
#5
Re: How to ......
Sorry about that.. Didn't see that your code was placing the picture object.
Here's what you need to do in order to get a "bottoms up" version of the mentioned code snippet:
Dim lngPictureHeight as Long ' The final height of the picture
Dim lngBaseLineY as Long ' The base line for the picture (vertical)
Dim lngYpos as Long ' ditto
lngBaseLineY = 4700 ' Base distance from Top
lngPictureHeight = 3000 ' Insert correct value here
lngYpos = lngBaseLineY ' Vertical start position
While (lngBaseLineY - lngYpos) < lngPictureHeight
lngYpos = lngYpos - 1
picture1.top = lngYpos ' Move picture up
picture1.height = picture1.height + 1 ' Scale the vertical size
...(perhaps a delay here)...
me.repaint
Wend
Hope this helps
Pedro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|