别克车保养周期表:懂VB的朋友帮我看下(这是一个制作记事本的一些代码),我的注释对吗

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 22:18:50
Private Sub Form_Resize() 'form窗体的重设尺寸
If Form1.Width - 150 > 0 Then '如果FORM1宽度减去150大于0 那么
Text1.Width = Form1.Width - 150 'text1宽度等于form1的宽度减去150
Else '否则
Text1.Width = 1 'text1宽度为1
End If '结束循环
If Me.Height - 696 > 0 Then '如果TEXT1的高度减去696大于0,那么
Text1.Height = Form1.Height - 696 'text1的高度等于FORM1的高度减去696
Else '否则
Text1.Height = 1 'text1的高度等于1
End If '结束循环
Text2.Width = Text1.Width 'text2宽度等于text1宽度
Text2.Height = Text1.Height 'text2高度等于text1高度
End Sub

Private Sub m_autocl_Click() '自动换行的选定与否
If m_autocl.Checked = True Then '如果“自动换行”被选中,那么
m_autocl.Checked = False '取消选定自动换行
'Text1.ScrollBars = 3 '水平、垂直滚动条
Text2.Visible = False 'text2不可见且不可用
Else '否则
m_autocl.Checked = True '设定自动换行
'Text1.ScrollBars = 2 '只有垂直滚动条
Text2.Visible = True 'text2可见也可用
End If '结束循环
End Sub

Private Sub m_exit_Click() '退出按钮的单击
Unload Me '卸载本窗体
End Sub

Private Sub m_new_Click() '新建按钮的单击
Text1.Text = "" ' 清除文本框的内容
End Sub

Private Sub Text1_Change() 'TEXT1的改变
Text2.Text = Text1.Text 'TEXT2文本和text1文本一致
End Sub

Private Sub Text2_Change() 'text2的改变
Text1.Text = Text2.Text 'text1文本和text2文本一致
End Sub

谢谢了

If...End If 不是循环啊,为什么写“结束循环”呢?它只是条件判断而已。


不错
有前途

对对对,可以啊