Hi everyone, please help me, i don't know how to insert a datepicker in VB4.
I am trying to find something in the web, but there is no documentation about it.
I will apreciate a lot the help.
Thanks in advanced.

Dani AI

Generated

tried an online tutorial that did not work, and correctly pointed toward the Windows common-controls approach. In VB4 the usual Date/Time picker is supplied as an ActiveX control (not a built-in textbox feature), so it will only appear in the IDE if the matching common-controls OCX is present and registered, and if you are running the correct VB4 flavor (VB4 has both 16- and 32-bit variants).

Practical checklist:

  • Confirm the Date/Time control file (commonly the MSCOMCT2.OCX from the Windows common-controls package) is present on the machine you are using.
  • Register the OCX with regsvr32 from an elevated command prompt; on modern 64-bit Windows use the 32-bit regsvr32 in SysWOW64 for 32-bit OCXs.
  • Restart the IDE and enable the control from the Controls/Components dialog so it appears on the toolbox.
    If registration fails, run the IDE/command prompt as Administrator, verify you are using the 32-bit OCX for a 32-bit IDE, or use a 32-bit VM (Windows XP/7) for legacy development.

If you still cannot use the ActiveX, alternatives are: use the MonthView control from the same OCX as a popup calendar, implement a small calendar form that sets a textbox value, or migrate the project to a newer environment (VB6/VB.NET) for easier support. Caution: only register OCXs from trusted sources and back up your system before making registry changes.

Recommended Answers

All 2 Replies

The only thing that i find, is this article.
But didn't work for me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.