我在做一个VB程序,在VB调试下可以运行,但是编译成EXE可执行文件后,就连在本机都无法运行,且未出现任何错误提示,不知道是哪里出错,大家帮帮忙吧,谢谢!!

解决方案 »

  1.   

    ActiveX exe 是不能直接运行的。
    如果不是的话,关掉杀毒软件试试。
      

  2.   

    与这些没关系
    没用到ActiveX exe
    我当时怀疑我的机器太老或者SP版本不够
      

  3.   

    這種事情我也遇到過,VB調試狀態沒問題,編譯後,一啟動不自動關閉。
    這應當是程式中代碼有問題。比如Combox的預設值有問題等。比如Combox的Text值在它的選擇List項中沒有。
      

  4.   

    将MSVBVM60.DLL和程序中用到的.ocx控件文件(可用从.vbp文件中查看)拷贝到执行文件目录下试试。
      

  5.   

    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
        Dim mDatos() As Byte    With PropBag
            MyButtonType = .ReadProperty("BTYPE", 2)
            elTex = .ReadProperty("TX", "")
            isEnabled = .ReadProperty("ENAB", True)
            Set UserControl.Font = .ReadProperty("FONT", UserControl.Font)
            MyColorType = .ReadProperty("COLTYPE", 1)
            showFocusR = .ReadProperty("FOCUSR", True)
            BackC = .ReadProperty("BCOL", GetSysColor(COLOR_BTNFACE))
            BackO = .ReadProperty("BCOLO", BackC)
            ForeC = .ReadProperty("FCOL", GetSysColor(COLOR_BTNTEXT))
            ForeO = .ReadProperty("FCOLO", ForeC)
            MaskC = .ReadProperty("MCOL", &HC0C0C0)
            UserControl.MousePointer = .ReadProperty("MPTR", 0)
            Set UserControl.MouseIcon = .ReadProperty("MICON", Nothing)
            Set picNormal = .ReadProperty("PICN", Nothing)
            Set picHover = .ReadProperty("PICH", Nothing)
            useMask = .ReadProperty("UMCOL", True)
            isSoft = .ReadProperty("SOFT", False)
            PicPosition = .ReadProperty("PICPOS", 0)
            useGrey = .ReadProperty("NGREY", False)
            SFX = .ReadProperty("FX", 0)
            Me.HandPointer = .ReadProperty("HAND", False)
            isCheckbox = .ReadProperty("CHECK", False)
            cValue = .ReadProperty("VALUE", False)
            m_IconPath = .ReadProperty("PATHICON", "")
            mColor1 = .ReadProperty("GCOLOR1", GetSysColor(COLOR_BTNFACE))
            mColor2 = .ReadProperty("GCOLOR2", GetSysColor(COLOR_BTNFACE))
            mGradirection = .ReadProperty("GRADDIR", 0)
            mDatos() = .ReadProperty("PICPNG")   
            Call picPng.LoadPicture_Stream(mDatos())
        End With    UserControl.Enabled = isEnabled
        Call CalcPicSize
        Call CalcTextRects
        Call SetAccessKeysEnd Sub
    提示 PICPNG 值不存在
      

  6.   

    mDatos() = .ReadProperty("PICPNG")   这句没看懂。
      

  7.   

    那你这个 .ReadProperty("PICPNG")   到底存在不?里面是什么样的值?
    再说数组不是这么赋值吧