巫妖天下 - LichSky

关于作者:专注于微软平台项目架构、管理和企业解决方案。熟悉各类技术手段、架构设计、开发和项目管理。现主要从事项目开发、架构、管理工作。

VB 号码去重复

[CODE_LITE]
Function doRep(Con As String) As String
Dim a As New Collection
Dim aa As String
Dim ab As String
Dim ac As String

ac = Con & ","

If InStr(ac, ",") > 0 And Len(ac) > 11 Then

On Error Resume Next
...

VB 关于 debug 打印

代码打印如下

Debug.Print "hello world!"


如何调出debug窗口

菜单 view ->  Immediate Window 


如何删除debug的东西

停止运行的状态下,ctrl+A 全选所有内容,按 Delete ,即可删除

HyperApp 伟大的HTML控制窗体程序

HyperApp - 用HTML做你的程序界面,作者潜心研究多年的成果。
201308211503361120.zip

/COMMON/TOOLS/VB/UNSUPPRT/TYPLIB

 C1.EXE 
 CL.EXE 
 MKTYPLIB.EXE 
 MSPDB41.DLL  

201205051509304005.rar

VB 窗体抖动

[CODE_LITE]
'ty 是一个textBox ,默认值是 30

Private Sub Command1_Click()
Dim t, L
Dim i, Tt, Ll

t = Me.Top
L = Me.Left

For i = 1 To 200 ' 这个200 可以控制抖动的次数
Tt = Rnd(1) * ty - ty / 2
Ll = Rnd(1) * ty - ty / 2
Me.Top = Me.Top + Tt
...

VB 下载文件代码

[CODE_LITE]
Sub downFile(url As String)
Dim bytes() As Byte
'把文件的字节读到一个Byte数组中
bytes() = Inet1.OpenURL(url, icByteArray)

Open "c:\mp3.mp3" For Binary Acc

vb json 文字编码器\u7f16\u7801

[CODE_LITE]
Private Sub Command1_Click()

Text2.Text = CodeToUni(Text1.Text)

End Sub


Private Sub Command2_Click()

Text1.Text = UniToCode(Text2.Text)

End Sub


'-----------------字符Unicode编码与反编码----------------------
Function CodeToUni(code)
...

VB richTextBox 禁止ctrl+V

[CODE_LITE]
Private Sub Command1_Click()
Text1.Text = Text1.Text & Clipboard.GetText
End Sub


Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyV And Shift = vbCtrlMask Then
MsgBox "请右键粘贴", , "警告"
KeyCode = 0
...

VB 建文件夹(支持多重目录)

[CODE_LITE]
Private Declare Function SHCreateDirectoryEx Lib "shell32" Alias "SHCreateDirectoryExA" (ByVal hwnd As Long, ByVal pszPath As String, ByVal psa As Any) As Long
'以下代码可以建立多级文件夹:
Private Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal lpPath As String) As Long
...

VB 检测组件是否已注册

[CODE_LITE]
Option Explicit
Private Const HKEY_CLASSES_ROOT = &H80000000
Private Const KEY_QUERY_VALUE = &H1
Private Const KEY_ENUMERATE_SUB_KEYS = &H8
Private Const KEY_NOTIFY = &H10
Private Const READ_CONTROL = &H20000
Private Const STANDARD_RIGHTS_READ = (READ_CONTROL)
...
分页:[«]1[2][3][»]

Powered By Z-Blog 1.8 Walle Build 100427

Copyright 巫妖天下(lichsky@163.com) All Rights Reserved.