vb6.0中把文字转化为二进制的函数是哪个?我们看到的是二进制吗,还是二进制以文本方式来显示?
答案:2 悬赏:20 手机版
解决时间 2021-04-08 05:54
- 提问者网友:萌卜娃娃
- 2021-04-07 05:18
vb6.0中把文字转化为二进制的函数是哪个?我们看到的是二进制吗,还是二进制以文本方式来显示?
最佳答案
- 五星知识达人网友:像个废品
- 2021-04-07 05:28
似乎没有,需要自己做:
Private Function str2bin(ByVal num As Integer) As String
If num < 0 Then
num += 65536
End If
Dim str As String = ""
Do While num > 1
str = (num Mod 2) & str
num = Int(num / 2)
Loop
str2bin = num & str
End Function
Private Function str2bin(ByVal num As Integer) As String
If num < 0 Then
num += 65536
End If
Dim str As String = ""
Do While num > 1
str = (num Mod 2) & str
num = Int(num / 2)
Loop
str2bin = num & str
End Function
全部回答
- 1楼网友:逐風
- 2021-04-07 06:52
可以。
private declare function ebexecuteline lib "vba6.dll" (byval pstringtoexec as long, byval unknownn1 as long, byval unknownn2 as long, byval fcheckonly as long) as long
private function executeline(scode as string, optional fcheckonly as boolean) as boolean
executeline = ebexecuteline(strptr(scode), 0&, 0&, abs(fcheckonly)) = 0
end function
private sub form_click()
executeline text1.text
end sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯