i had built a simple project in vb6 and ACCESS for simply update the database and fatching the required data from existing data base. previously it was working , but when i formatted my pc and again run the project it was showing so many error massage at the time of loading that is
1. line 245: class mscomctl2.dtpicker of control dtpicker1 was not loaded control class.
2. line 1013 :class msdbgrid.dbfrid of control mdtkexgrid3 was not loaded control class.

etc many more of same type .
anybody will help me .

Dani AI

Generated

This looks like a classic case of missing/ unregistered ActiveX controls after the system was reformatted. reported several controls failing to load and offered to inspect the project—timers themselves aren’t the cause; the IDE is simply unable to find the OCX/DLL that implements the controls on the forms (date-picker, grid, and similar controls). The usual fixes are to identify which component each form expects, reinstall or copy the corresponding OCX/DLL, and register it with the OS.

Quick diagnostic and repair checklist:

  • Open the form file (.frm) in a text editor and search for the control Class or ProgID to learn which component is required. Back up the file first.
  • In the VB6 IDE check Project → Components and Project → References for any entries marked MISSING and note their names.
  • If a missing component is a standard VB control, restore the OCX (for example the Date/Month picker often comes from the Microsoft common-controls OCX family). If it’s a third‑party grid, use that vendor’s installer or copy the specific OCX from a working machine. Third‑party controls must be installed, not just dropped into a folder in many cases.

How to register an OCX (run an elevated command prompt):

:: 32-bit Windows
regsvr32 "C:\Windows\System32\mscomct2.ocx"

:: 64-bit Windows (register a 32-bit OCX)
C:\Windows\SysWOW64\regsvr32 "C:\Windows\SysWOW64\mscomct2.ocx"

Always run regsvr32 as Administrator. If the OCX isn’t present, copy it from a backup, the original install media, or reinstall the control’s package.

Extra tips: reinstall VB6 runtime components / service pack if core controls are missing; install the correct Jet/ACE drivers for Access databases; remove or replace unused controls (after backing up) by editing the .frm if a control is orphaned. These steps resolve the vast majority of “control class not loaded” errors without changing project logic.

Recommended Answers

All 5 Replies

are the files/controls that you are trying to import?
more info needed

thank u for showing interest in my problem
i am not trying to import any file / control it is only just using the vb's files and controls

so its not one of those icons you can draw eg a timer or another controll that isnt normally displayed its just an in built function and not a controll or component?

sorry if im repeating myself im just trying to understand, it may help if you can give me the modual and form files for the project so i can have a look and see the problem.

yes i have used a timer here but how timers are creating problem ?
ok ,give me ur mail id so that i will send u directly my project with source code.

thank u

i dont think its the timer, but ill look atyoure code and ill see if i can find the bug.

my email:

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.