📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00E0E0E0&
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
FillColor = &H00C0C0C0&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 375
Left = 1440
TabIndex = 1
Top = 1800
Width = 1455
End
Begin VB.TextBox Text1
Height = 375
Left = 360
TabIndex = 0
Text = """abcdefgabcdecd"",""cd"",""3"""
Top = 480
Width = 3855
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
'##################################################################
'## 函数名称:myreplace
'## 参数:s$ 类型不确定
'## 参数:olds$ 类型不确定
'## 参数:news$ 类型不确定
'As String'## 返回类型:As String
'##################################################################
Public Function myreplace(s$, olds$, news$) As String
Dim i%, lenolds%
lenolds = Len(olds)
i = InStr(s, olds)
Do While i > 0
s = Left(s, i - 1) + news + Mid(s, i + lenolds)
i = InStr(s, olds)
Loop
myreplace = s
End Function
'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
Text1 = myreplace(Text1, "cd", "3")
Print myreplace("visual basic 程序设计教程5.0版", "5.0", "6.0")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -