Dim plength, i As IntegerDim masterpass, pwd As String
Dim jj As Double
pwd = Text1.Text
plength = Len(pwd)
jj = 89
If plength > 0 Then
pwd = pwd + Left(" ", 8 - plength)
plength = Len(pwd)
For i = 1 To plength
MsgBox Asc(Mid(pwd, i, 1)) * i * 256
jj = jj + Asc(Mid(pwd, i, 1)) * i * 256 - i * i
'MsgBox jj
Next
masterpass = CStr(j)
If Len(masterpass) > 8 Then masterpass = CStr(CInt(Left(masterpass, 8)) + CInt(Mid(masterpass, 9, 10)))
End If
End If我在textbox输入123时,循环到第三步,Asc(Mid(pwd, i, 1)) * i * 256就报错,溢出??
Dim jj As Double
pwd = Text1.Text
plength = Len(pwd)
jj = 89
If plength > 0 Then
pwd = pwd + Left(" ", 8 - plength)
plength = Len(pwd)
For i = 1 To plength
MsgBox Asc(Mid(pwd, i, 1)) * i * 256
jj = jj + Asc(Mid(pwd, i, 1)) * i * 256 - i * i
'MsgBox jj
Next
masterpass = CStr(j)
If Len(masterpass) > 8 Then masterpass = CStr(CInt(Left(masterpass, 8)) + CInt(Mid(masterpass, 9, 10)))
End If
End If我在textbox输入123时,循环到第三步,Asc(Mid(pwd, i, 1)) * i * 256就报错,溢出??
解决方案 »
- 对于一个日期型变量,如果给它赋一个字符串(比如“8-8-2008”),如何识别哪部分是日,哪部分是月呢?
- 在VB6中如何获取文本框中用鼠标选中的内容
- 关于满足***条件后,网页里的表格的相应记录,应用相应css的问题.
- 请教datagrid背景色问题
- 如何用winsock在使用宽带路由器的情况下传输数据
- 急! "480错误""autoredraw不能创建图象"
- 我想随机抽出20条记录 我该怎么做??
- 如何通过窗体的句柄(hwnd)将该窗体调到屏幕最前面,并最大化?(在线等待)
- 请问这个应该怎么测试?
- VB中DBGRID控件和Data控件产生的问题
- 请教高手:请问vb中能调用matlab吗?
- 一个简单的问题,可能无解,但还是问问看,权当散分
这样只有i是Integer,plength是Variant
Integer也不是长整型,是16位的
32整型应该用Long