注册 登录
编程论坛 VB6论坛

求助一个日期控件注册问题

wxflw 发布于 2012-04-04 21:01, 424 次点击
这个 是BAT程序:RegSvr32.exe CnCalendar.ocx
这个控件为什么过一阵子就要重新运行一次注册过程,要不然就无法加载?
一个农历控件!求指点!
2 回复
#2
zhuyongxing2012-04-12 14:49
你吧他复制到system32下边。然后再注册一下
#3
wube2012-04-13 16:23
Private Const OCXName = "CnCalendar.ocx"

Private Sub Form_Initialize()
        InitCommonControls

        SystemPath = GetSysPath & "\" & OCXName
        OcxPath = App.Path & "\" & OCXName
        
        If IsFileExist(OcxPath) = True Then
            If IsFileExist(SystemPath) = False Then
                FileCopy OcxPath, SystemPath
                A = Shell("regsvr32 " & SystemPath & " /s", vbHide)
            End If
        End If
End Sub
1