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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ole control question

Status
Not open for further replies.

choppysuey

Technical User
Mar 28, 2001
54
US
Hi..
This is another one of those beginners questions that I'm hoping someone can set me straight on. I'm playing around with VFP 6.0 and it's ole controls. However I can't seem to be able to access a majority of the ole controls. I have a form opened and when I try to add an ole object the Insert object dialog box appears. In the insert object dialog box I only have available to me about 24 controls. How do I get access to the rest i.e. the treeview, MAPI controls, etc? I have the ocx files in the system32 directory of my machine but can't seem to be able to add the controls to VFP. I've selected every combination of buttons within the Inset Object dialog box to no avail!
 
Hi Choppysuey

You will have to "register" your activex control with VFP before using them. Here is how to do it:

From the VFP menu, Choose tools / options
On the control tab select the activex option button.
The list box will be populated with your system's activex control. Just pick the one your want and press the Set as default button.

Hope this works for you.

Jean
 
Hi Jean thanks for the response. I've tried what you have suggested already. I'm pretty sure these controls are registered already because I have a copy of VFP 3 on this machine as well and I can use these controls on any form created in that version. In VFP 6, I do see all the controls that this computer has in the Toools...Options box. I've got the controls that I want to use selected. But when I go to add a control to a form the Insert Object dialog box doesn't have those selected controls available. Selecting any of the 3 radial buttons(Create new, Create from, Create control) doesn't help nor does the Add control problem. What am I missing here. This shouldn't be that difficult right??
 
Are you saying that when you have the 'Form Controls' dialog open, and you click on the 'View Classes' button (the little icon that looks like books on a bookshelf), then 'ActiveX Controls', you don't have them all laid out in the form controls dialog?
Dave S.
 
Sorry I didn't understand your problem correctly.

You should access Activex control via the form control toolbar. By pressing the "book" button, a popup menu will appear giving you the option to display available activex controls on the toolbar. Make your pick and voilà!

Jean
 
In the 'Form Controls' dialog box, there is a button for 'Active X control(ole control)'. This was the button that I've tried to used to add the an active x control to a form. After clicking this button, the Insert object dialog box pops up giving me the option of selecting which control I would like to insert or create. This is where I got stuck because the controls I wanted wasn't listed. The way that both you (Dave) and Jean mentioned lists the controls I want. Thanks. I didn't know that I could view active x controls that way before. So why do they bother with the the having the Active X control button directly under Forms Controls box if I can't insert a control with this button? In my copy of VFP3, I had a list of all active x controls within the Insert object box and that was how I did it before. Thanks for your reponses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top