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

How to Set MonthView.2 in MSComCtl2 1

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I can drop an ole control on my form and select MSComCtl2. How do I set it to MonthView.2? I found some code where I can create the ole with the monthview on the fly, but don't see any properties that can be changed when the control is on a form. What am I missing here? Also is there a way to detect when I need to register the ole control? Trying to avoid an install package.

I think I have solved the first part of my problem by using the active X Calendar in the foundation class.

Auguy
Northwest Ohio
 
Thanks Dave. Another dumb question. Where do I find the MonthView control? I don't see it anywhere. Also can I use the method described in General Coding faq184-2813 to resister the ocx?

Auguy
Northwest Ohio
 
Go to Tools->Options and click the 'Controls' tab. From there, click the 'ActiveX Controls' radio button. You can then scroll through the controls and check the ones you think you may want to add now or at a later date. Keep in mind that although they are alphbetical, Microsoft controls start with 'Microsoft ' or 'MS ' as in 'Microsoft Date/Time picker...'

Click 'Set As Default' to save your list.

Now go back to your form builder and make sure your 'Form Controls' dialog is open. Click on the 'View Classes' button (Looks like a set of books next to the pointer) and select 'ActiveX Controls'. The controls you selected will be available to drop on your form from there.

The safest thing to do here though is to subclass the class and add the subclass to your form. You will avoid other errors when copying a built exe to other computers.

Now you have a whole 'nuther ole control can of worms to play with. [wink]

As for registering the controls, if you have them available in the tools, they are already registered.
If you have to copy them to another user's computer, you will most likely have to register them.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks again Dave for your usual good info! Yes I plan on using the monthview in one of my classes. Actually I'm updating a class from VFP6 that had an old calendar control on it.

Auguy
Northwest Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top