vb中有什么方法能获得中文字的gb2312码
解决方案 »
- 问一个SQL SERVER 2008安装时出现的问题
- 请教:我用VB做点对点视频聊天,摄像头的数据怎么获得?摄像头数据读写接口函数是什么?
- 更正本人在一个老贴: "VB中调用API CopyMemory出错"(位置见文内)中 发表的"半吊子见解"。
- how to set focus at the control whose tabindex is the smallest
- VB6不支持类的继承,有什么方法在VB6中实现类似的功能吗?
- 遇到的奇怪问题。。。100分啊
- vb6的数据库问题(很简单的问题)
- 一个简单的问题!
- win32 sdk 是什么东西?到哪可以得到?
- 怎么样用Esc做快捷键?
- 将数据库升级后程序出错了(VB6.0) ,如何解决?
- 请高人指教 如何使用datareport阿
Dim A As Long
A = Asc(S)
If A < 0 Then A = A + 65536
GetGB2312_A = (A \ 256 - 160) * 100 + A Mod 256 - 160
End FunctionFunction GetGB2312_B(ByVal S As String)
S = StrConv(S, vbFromUnicode)
GetGB2312_B = (AscB(MidB(S, 1, 1)) - 160) * 100 + AscB(MidB(S, 2, 1)) - 160
End FunctionPrivate Sub Form_Load()
Debug.Print GetGB2312_A("啊")
Debug.Print GetGB2312_B("啊")
End
End Sub