VB调试下可以运行,但是编译成EXE可执行文件后,就连在本机都无法运行 我在做一个VB程序,在VB调试下可以运行,但是编译成EXE可执行文件后,就连在本机都无法运行,且未出现任何错误提示,不知道是哪里出错,大家帮帮忙吧,谢谢!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ActiveX exe 是不能直接运行的。如果不是的话,关掉杀毒软件试试。 与这些没关系没用到ActiveX exe我当时怀疑我的机器太老或者SP版本不够 這種事情我也遇到過,VB調試狀態沒問題,編譯後,一啟動不自動關閉。這應當是程式中代碼有問題。比如Combox的預設值有問題等。比如Combox的Text值在它的選擇List項中沒有。 将MSVBVM60.DLL和程序中用到的.ocx控件文件(可用从.vbp文件中查看)拷贝到执行文件目录下试试。 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 值不存在 mDatos() = .ReadProperty("PICPNG") 这句没看懂。 那你这个 .ReadProperty("PICPNG") 到底存在不?里面是什么样的值?再说数组不是这么赋值吧 请问这个链接需要什么环境?普通电脑得需要装什么东西才能正常运行 [求助]如何用VB实现矢量图的制作并能区分图层? 如何判断fomr1标题栏的关闭按扭被点 关于wise installation打包vb程序的问题 请问在win2k下面怎么样对文件夹加密? 如何在控件中使用模式窗体 有一个很基础的问题,但是我怎么也不会 问一个比较弱弱的问题!!在线等 怎么获取SSDT 的函数列表 如何去除图片的背景色 两千元找人写个程序 VB 禁止指定窗口标题栏菜单
如果不是的话,关掉杀毒软件试试。
没用到ActiveX exe
我当时怀疑我的机器太老或者SP版本不够
這應當是程式中代碼有問題。比如Combox的預設值有問題等。比如Combox的Text值在它的選擇List項中沒有。
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 值不存在
再说数组不是这么赋值吧