在名称为form1的窗体上,画一个文本框内容为“计算机”,再画三个命令按钮,标题分别为居左、居中、居右

编写三个命令按钮的Click事件过程,使得分别单击居左居中居右按钮时,文本框的内容分别对应靠左靠中靠右对齐,每个事件过程只能写一条语句

第1个回答  2012-06-18
Private Sub Command1_Click() '居左
Text1.Alignment = 0
End Sub

Private Sub Command2_Click() '居中
Text1.Alignment = 2
End Sub

Private Sub Command3_Click() '居右
Text1.Alignment = 1
End Sub本回答被网友采纳
第2个回答  2012-06-18
简单
Private Sub Command1_Click()
Text1.Alignment = 0
End Sub

Private Sub Command2_Click()
Text1.Alignment = 2
End Sub

Private Sub Command3_Click()
Text1.Alignment = 1
End Sub本回答被提问者采纳
第3个回答  2012-06-18
Private Sub Command1_Click()
Text1.Alignment = 0
End Sub

Private Sub Command2_Click()
Text1.Alignment = 2
End Sub

Private Sub Command3_Click()
Text1.Alignment = 1
End Sub
相似回答