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

Problem with Microsoft Calendar Control in VB

Status
Not open for further replies.

gaya

Technical User
Apr 2, 2007
4
AM
Hello, all
in the application developed in vb6.0 we are using calendar control 11.0
in all machines we have tested the application, everything looks fine, but on the clients machine no number shows for dates when opening the calendar form. Please, if anyone could help me with this. Thank you a lot!
 
Hi and welcome to Tek-Tips. To get the best from these forums read faq222-2244 carefully.

For this question, I would remove the Calendar control (which isn't recommended for use with VB6) and use the proper VB control. You can choose between DateTimePicker control and the Monthview control, deoending on your exact needs

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
I agree with John. To get the DateTime picker controls, you will need to add the proper component.

In vb...

Click Project -> Components.
Select Microsoft Windows Common Controls-2 6.0


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
johnwm - would you elaborate on your statement:
I would remove the Calendar control (which isn't recommended for use with VB6)
I have a couple of Calendar controls in my app, but I move (little by little) to MonthView.

Why it (Calendar control) may not work any more in VB6?


Have fun.

---- Andy
 
Andy
Sadly I can't find the original MS reference (MSDN changes too often to keep up with, and most of the VB6 stuff is long gone). From what I recall (and I stand to be corrected) the Calendar control is an Office control, and each version was effectively tied to its version of Office. It was always flaky, and changed considerably from Office version to Office version.

The effect is that, if you use Calender, even if you get it working, it is liable to die if your user changes Office version. MS used to give warnings about using MS OFffice controls in VB6 programs, but I believe that is now sorted in VB.NET and the latest versions of Calender control.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
You are probably using MSCAL.OCX "Microsoft Calender Control x.x"
If you have microsoft Office on your machine this is why you were able
to select this control and use it. As far as machines that have no problems
they all have the same version of MSCAL.OCX because of the MS Office package
So simply the CPU that was not compatible had a different version.
In order to make your VB Application Compatible you will need to:
1. Check to see if you are in Fact using MSCAL.OCX
a: Click Project in your vb development menu
b: select components from the drop down list
c: Scroll the list and find "Microsoft Calender Control x.x"
d: If its checked move to step 2

2. Delete the calender from your app.
3. Repete a: thru c: above and this time Uncheck it
4. Replace the calender Control
a: repete a: thru b: above
b: this time scroll to "Microsoft Windows Common Controls-2 6.0(SP6)
c: click apply
5. Now you have access to the MonthView Control and the DatePicker.
6. And for the real bummer re-coding

NOTE: The MSCAL is not something you can legally use if you plan to distribute your app commercially, the monthview and the DatePicker are legal.
 
>The MSCAL is not something you can legally use if you plan to distribute your app commercially

This is not strictly true. If you have the Developer version of Office you are perfectly entitled to redistribute MSCAL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top