Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh form with OLE object problem

Status
Not open for further replies.

skyyonk

Programmer
May 6, 2002
23
0
0
SG
Hi,

I have a form with 1 pageframe and 3 pages. On page1, i have an ole object(msflexgrid). When the form is loaded and set focus immediately to page3, the ole object in page1 was displayed in page3 which is not what i wanted. It should not be there. Tried form refresh but did not help. Any way to solve this problem?
 
I sounds like the ole object may have been dropped on the form instead of the pageframe. Cut the ole object so it is deleted from the form, but remains in your clipboard, then right mouse click on the form and select edit. Then Select page3, then paste it on just page 3.

Let us know if that is the problem or if it is something else.

Jim Osieczonek
Delta Business Group, LLC
 
The flexgrid is dropped on the pageframe and not the form. Has been working fine until i was required to set activepage to 3 upon form load due to user requirements. When i click on page1 and back to page3 again, the problem is resolved. Btw, i am using visual foxpro 6. Same problem for datetimepicker ole object.

 
I have seen this behavior before with ActiveX controls and pageframes. I can't recall what I did to fix it (sorry)... but this is a bug.

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
This may be a work around. If you can, place the OLE control on a container. Initially, set the container visible and enabled properties to .F.

In the activate event of page 1 (when you click on the the first time) place code to make the container Visible and Enabled.

If OLE control works okay within a container - this should fix the problem because the container will not be visible when you first load the form to pgframe3.

I am not saying this is pretty, but is may work.

Jim Osieczonek
Delta Business Group, LLC
 
Hi Jimoo,

Your solution does work though its not pretty to do it this way. Thanks alot. Maybe its a bug in visual foxpro 6 that causes this problem. Will play around with the visible and enabled properties.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top