好文档 - 专业文书写作范文服务资料分享网站

VB程序设计教程(第3版)课后实验答案 

天下 分享 时间: 加入收藏 我要投稿 点赞

j = j + 1 s = s + i End If Next i

If m = s Then IsWs = True End Function

F.7

Private Sub DeleStr(s1 As String, ByVal s2 As String) Dim i%

ls2 = Len(s2) i = InStr(s1, s2) Do While i > 0

s1 = Left(s1, i - 1) + Mid(s1, i + ls2) ' 在s1中去除s2子串 i = InStr(s1, s2) Loop End Sub

Private Sub Command1_Click() ' 调用DeleStr子过程 Dim ss1 As String ss1 = Text1

Call DeleStr(ss1, Text2) Text3 = ss1 End Sub

Private Sub Command2_Click()

End Sub

F.8

Private Sub Command1_Click() Dim maxw$

maxlen Text1 & \Text2 = maxw End Sub

Sub maxlen(s$, maxw$) Dim word$ maxw = \

Do While s <> \ i = InStr(s, \

word = Left(s, i - 1)

If Len(word) > Len(maxw) Then maxw = word s = Mid(s, i + 1) Loop

End Sub

Private Sub font16_Click() Text1.FontSize = 16 End Sub

Private Sub Form_Load() bold.Checked = False italic.Checked = False End Sub

Private Sub italic_Click()

Text1.FontItalic = Not Text1.FontItalic italic.Checked = Not italic.Checked End Sub

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu menu2 End Sub

VB程序设计教程(第3版)课后实验答案 

j=j+1s=s+iEndIfNextiIfm=sThenIsWs=TrueEndFunctionF.7PrivateSubDeleStr(s1AsString,ByVals2AsString)Dimi%
推荐度:
点击下载文档文档为doc格式
8q0098uzgc4ddq243gyf
领取福利

微信扫码领取福利

微信扫码分享