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!

Cannot find Date/Time Picker Control

Status
Not open for further replies.

acjeff

Programmer
Aug 10, 2004
148
US
Hello,

On my VB6 program, I cannot find the MS Date/Time Picker Control.

I selected References -> Browse -> System32 folder -> MSCOMCT2.OCX -> Open. Then there was a Microsoft Windows Common Controls-2 6.0 checked. So I clicked OK.

Then I selected Components, a Microsoft Windows Common Control 6.0 (SP6) was already checked. I could not uncheck it because it was in used. When I also checked Microsoft Windows Common Controls-2 6.0, it popped up an error of Name conflicts with existing module, project, or object library.

What should I do? I just want to use the DateTimePicker.

Jeff
 
Remove the reference and try adding the component.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Remove which reference? After I added the MSCOMCT2.OCX, I didn't see it in the reference list again.
 
Close VB.

Make a copy of your .vbp file (for backup purposes).

Open your project file using Notepad. (I'm talking about the .vbp file).

You should see a line like this...

Reference=*\G{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0#..\..\..\WINDOWS\system32\MSCOMCT2.OCX#Microsoft Windows Common Controls-2 6.0 (SP6)

Remove the line, save the file, then re-open your project with VB. Hopefully, this will resolve your problem. At this point, you should be able to add the component (not the reference).

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
No. The reason I added the MSCOMCT2.OCX to the reference was I could not find the MS Date Time Picker Control on the component list. If I remove the this from the reference, I still do not have the control I want. ???
 
After removing the reference from the .vbp file, you can add the component.

Click Project -> Components
Select "Microsoft Windows Common Controls-2 6.0 (SP6)"

Since you removed the reference, you should not get the error about "name conflicts...."

After you add the component, the control will be available in the 'tool box' of controls.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I should mention that you do NOT need a reference to the control if you have it in the components.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
But I do not have it in the components list. I am using Visual Studio 6.0 Enterprise Edition with SP6. I don't know why it doesn't have DateTimePicker Control exist.

Any other idea?
 
Care to share what the fix was? It may be helpful for others if they ever stumble across this thread.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Nothing special I have done. Just closed everything and opened the original progarm again. Then opened references and using browse to add MSCOMCT2.OCX. Then this time I found the Microsoft Windows Common Control-2 6.0 on the components list and I was able to add it on my project. Everything just worked fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top