1. form_click 事件
form1.width=form1.width-100
form1.heigh=form1.heigh-100
form1.caption="窗体面积为:" & form1.width*form1.heigh
2. form_Load 事件
form1.caption="可移动窗体"
form_click 事件
form1.left=form1.left-100
3. text_lostfocus 事件
if len(text1.text)<>6 then
text1.setfouce
end if
1.Private Sub Form_Click()
With Me
.Move .Left, .Top, .Width - 100, .Height - 100
.Caption = "(" & .Width & "," & .Height & ")"
End With
End Sub
2.Private Sub Form_Load()
Me.Caption = "可移动的窗体"
End Sub
Private Sub Form_Click()
Me.Left = Me.Left - 100
End Sub
3.Private Sub Text1_LostFocus()
If Len(Text1) <> 6 Then Text1.SetFocus
End Sub