窗口双缓冲
Public Sub New()
' 此调用是 Windows 窗体设计器所必需的。
InitializeComponent()
' 在 InitializeComponent() 调用之后添加任何初始化。
SetStyle(Windows.Forms.ControlStyles.OptimizedDoubleBuffer Or Windows.Forms.ControlStyles.ResizeRedraw Or Windows.Forms.ControlStyles.AllPaintingInWmPaint, True)
End Sub
TextBox去除默认右键信息
Public Class ClaTextbox
Inherits System.Windows.Forms.TextBox
Public Sub New()
MyBase.New()
End Sub
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg <> &H7B Then
MyBase.WndProc(m)
End If
End Sub
End Class
正则表达式
'正则表达式
Public Function GetRegex(ByVal txtStr As String, ByVal regStr As String, ByVal groupIndex As Integer) As String
GetRegex = ""
Dim reg As New System.Text.RegularExpressions.Regex(regStr)
Dim matchs As System.Text.RegularExpressions.Match = reg.Match(txtStr)
GetRegex = matchs.Groups(groupIndex).Value
End Function