|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I wrote some code to move a line object "on timer" it dissappears, and doesnt produce an error. the code is below (some lines commented because they were just to see) and the timer is set to 1000.
Is it even possible to move or resize a control?
Select Case CDbl(Right(Time$, 2)) * 5 Case Is < 90 Me!second.Left = 8.5 Debug.Print Abs(Cos(CDbl(Right(Time$, 2)) * 5)) Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) Debug.Print CDbl(Right(Time$, 2)) Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 'Me!second.Visible = 0 Me!second.Width = Abs(Cos(CDbl(Right(Time$, 2)) * 5)) Me!second.Height = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) Me!second.Top = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 'Me!second.LineSlant = 0 'DoCmd.RepaintObject acForm, "addressbook" End Select
|
|
Your values need to be converted to twips. Mulitply everything by 1440, like this:
Me!second.Width = Abs(Cos(CDbl(Right(Time$, 2)) * 5)) * 1440
Barry
"Ken" wrote:
[Quoted Text] > I wrote some code to move a line object "on timer" it dissappears, and doesnt > produce an error. the code is below (some lines commented because they were > just to see) and the timer is set to 1000. > > Is it even possible to move or resize a control? > > Select Case CDbl(Right(Time$, 2)) * 5 > Case Is < 90 > Me!second.Left = 8.5 > Debug.Print Abs(Cos(CDbl(Right(Time$, 2)) * 5)) > Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) > Debug.Print CDbl(Right(Time$, 2)) > Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 > 'Me!second.Visible = 0 > Me!second.Width = Abs(Cos(CDbl(Right(Time$, 2)) * 5)) > Me!second.Height = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) > Me!second.Top = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 > 'Me!second.LineSlant = 0 > 'DoCmd.RepaintObject acForm, "addressbook" > > End Select
|
|
On Thu, 21 Sep 2006 10:03:01 -0700, Ken wrote:
[Quoted Text] > I wrote some code to move a line object "on timer" it dissappears, and doesnt > produce an error. the code is below (some lines commented because they were > just to see) and the timer is set to 1000. > > Is it even possible to move or resize a control? > > Select Case CDbl(Right(Time$, 2)) * 5 > Case Is < 90 > Me!second.Left = 8.5 > Debug.Print Abs(Cos(CDbl(Right(Time$, 2)) * 5)) > Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) > Debug.Print CDbl(Right(Time$, 2)) > Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 > 'Me!second.Visible = 0 > Me!second.Width = Abs(Cos(CDbl(Right(Time$, 2)) * 5)) > Me!second.Height = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) > Me!second.Top = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 > 'Me!second.LineSlant = 0 > 'DoCmd.RepaintObject acForm, "addressbook" > > End Select
All measurements must be in Twips (1440 per inch). So using Me!second.Left = 8.5 would position the control at 8.5 Twips from the left, which would not be observable to the human eye. Me!second.Left = 8.5 * 1440 wound position the control 8.5 inches from the left. Is that where you wanted it? Adjust all measurements accordingly.
-- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
|
|
Thanks Tons! I forgot all about that.
"Ken" wrote:
[Quoted Text] > I wrote some code to move a line object "on timer" it dissappears, and doesnt > produce an error. the code is below (some lines commented because they were > just to see) and the timer is set to 1000. > > Is it even possible to move or resize a control? > > Select Case CDbl(Right(Time$, 2)) * 5 > Case Is < 90 > Me!second.Left = 8.5 > Debug.Print Abs(Cos(CDbl(Right(Time$, 2)) * 5)) > Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) > Debug.Print CDbl(Right(Time$, 2)) > Debug.Print Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 > 'Me!second.Visible = 0 > Me!second.Width = Abs(Cos(CDbl(Right(Time$, 2)) * 5)) > Me!second.Height = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) > Me!second.Top = Abs(Sin(CDbl(Right(Time$, 2)) * 5)) + 3 > 'Me!second.LineSlant = 0 > 'DoCmd.RepaintObject acForm, "addressbook" > > End Select
|
|
|