Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repositioning an ActiveX control at runtime?
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01338213
Message ID:
01338305
Views:
20
I think I should explain further what I did here:

I have an existing form that uses the calendar ActiveX control MSCAL in a VFP Ole container control.

I decided I would like to extend that form, but keep the original. So, I saved the form as a class, and then used that class as the parent class for a new form. I then added a second control to the new form, to the right of the Ole Calendar control. I needed to move the calendar control to the left to make room for the new control, and get everything centered. All of this using the form designer. The layout looks correct at design time.

However at runtime, the calendar control appears in the place where it was in the original form.

So, I added some runtime code in the form refresh method (also tried the init method) to move the Ole Container Calendar control to the left. Tried two things: setting the Left coordinate of the OleControl to a new position. Also tried using the OleControl Move method to position it to the left. Neither method worked.

As a test, I used those same techniques to reposition the new control. And, that works just fine.

I can think of various work around for this, but I'd like to understand why I can't reposition the OleControl Calendar control.

Thanks for your help.

Jim

>I am using the MSCAL Calendar control that comes with Office12 (MSCAL.OCX). I have it in an Ole Container control on my form.
>
>I position the calendar in the form designer, but would conditionally like to reposition it at runtime. I can change the left propety of the OleContainer, but the calendar control doesn't move.
>
>Any thoughts?
>
>Thanks,
>Jim'
Previous
Reply
Map
View

Click here to load this message in the networking platform