Refreshing Forms

TheOx2K

Registered User.
Local time
Today, 23:22
Joined
Feb 19, 2002
Messages
28
I want a label on a full screen form to move to random possitions on the form on a timed basis.

I have tried to do it on click to start off with and have got the label top and left values to change but the label moves to the top left corner of the screen and does not move even though the values are.

I have tried the repaint, refresh commands but with no succsess.

This is the code i have got already but it doesnt work.

Private Sub Detail_Click()
DoCmd.Maximize
Dim MyValue
Randomize ' Initialize random-number generator.

MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.


Text5 = MyValue

STC_LABEL.top = MyValue
STC_LABEL.Left = MyValue
RefreshDatabaseWindow
Me.Refresh

End Sub
 
I have already tried the repaint command.

Thanx

Any other surgestions.
 
Are the top and left values too small for you to detect?

There is not much difference between a top value of 1, and a top value of 6. You may want to try some larger values to see if the code is indeed working.

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers http://www.peterssoftware.com
 

Users who are viewing this thread

Back
Top Bottom