how to move image in the form

gpriya
Member Posts: 17
Hi,
Iam facing one problem. I created one form and in that I put one label and one command button. I wrote the code in the command button as follows.
IF i = 0 THEN
REPEAT
CurrForm.Image.XPOS := i;
SLEEP(10);
i += 1;
UNTIL i = 10000;
when i click the command button the label is not moving slowly. once the loop is completed then only it is jumped from X position 0 to 10000. It is not moving slowly.
How can I show the label with slow movement.
Thanks in Advance,
Priya
Iam facing one problem. I created one form and in that I put one label and one command button. I wrote the code in the command button as follows.
IF i = 0 THEN
REPEAT
CurrForm.Image.XPOS := i;
SLEEP(10);
i += 1;
UNTIL i = 10000;
when i click the command button the label is not moving slowly. once the loop is completed then only it is jumped from X position 0 to 10000. It is not moving slowly.
How can I show the label with slow movement.
Thanks in Advance,
Priya
0
Comments
-
Instead of sleep I would use the timer of the form.
Set the TimerInterval property of the form and put your logic in the OnTimer trigger.Thomas Martin
NAV Developer0 -
try with increase sleep time.0
-
the problem is that the controls arent refreshed while in the loop from what i can see.
you could try a currform.updatecontrols or a currform.update0 -
Yes, you need to force currform.update to "redraw" the form, else it will update after the process finishes...0
-
thmartin wrote:Instead of sleep I would use the timer of the form.
Set the TimerInterval property of the form and put your logic in the OnTimer trigger.
better is to use currform.update or currform.updatecontrol.0 -
vijay_g wrote:thmartin wrote:Instead of sleep I would use the timer of the form.
Set the TimerInterval property of the form and put your logic in the OnTimer trigger.
better is to use currform.update or currform.updatecontrol.0 -
MBerger wrote:to be honest, personally i wouldn't put animations in NAV at all.
Agreed.0 -
0
-
Hi,
Thanks for your replies. I tried Currform.Update & Currform.Updatecontrols inside the loop. But it is not working in this case.
Regards,
Priya0 -
Thomas Martin
NAV Developer0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions