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!

Calendar Control - display difficulties

Status
Not open for further replies.

joanneabator

Technical User
Jul 9, 2003
7
0
0
Hello all,

I think this is an "is it plugged in" kinda question. No problems making the calendar control work in application code ... but two of my users can't see the darn calendar at all, while the other five can (everyone is running XP Professional and the app is a VB6.exe).

I'd sure appreciate being pointed in the right direction.

Thanks!
 
Don't use the Calendar control in VB6 programs - it's always been a bit flakey in all it's many versions. The proper VB control to use is the DateTimePicker control or the Monthview control, depending on exactly what you want to do. Both are found in MSCOMCT2.OCX, and details of their use is found in VB Help

________________________________________________________________
If you want to get 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
 
Well, thanks johnwm, but that doesn't help me solve the problem ;-(
 
The "problem" is that the Calendar Control is an MS/Office ActiveX and, depending on the specific release of Office that's installed, it may or may not work because it uses other MS/Office-sourced ActiveX controls to function.

If you (as johnwm suggests) use a Monthview control then you have a control that doesn't depend on having some other application installed in order for your application to work.
 
It not only helps you solve the problem, it tells you exactly how to do it: replace the control with one that works on all computers.

It's likely you won't be able to find a solution if you narrow it down to "fix a problem inherent in this control.
 
As others have said, it is almost certainly one of the many problems of the fairly grotty mscal.ocx.

If you really must use the calendar control in your VB6 app, then you need to ensure that the exact same version that works on your development machine is distributed to all target machines. This isn't guaranteed to fix the problem, and of course means other apps that are relying on their own version of the control may now break (so you need to make sure you retain a copy of the original version on each machine so that you can restore it when things go wrong)
 
Thanks, anyway. I didn't clearly state the problem, which is why it doesn't solve my problem ;-) I'm on the road, can't write and install code remotely at the moment and thought there'd be a quick fix to get two users off my back. They'll just have to deal til I can help them out.
 
If you need a "quick" fix, then do what strong suggested. Find out what version of Office the other users are using and get that installed on the computers that don't work. I'd be willing to bet that the two users upgraded and the others didn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top