如何在VB中单击窗体右上方时,使窗体移动到桌面的右上方?
ra3 2003-07-17 10:01:42 这是我写的单击窗体时让该窗口移到左上方的代码,如何让它到右上方就不懂了。
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'点击窗口的左上角时... ...
If X < Me.Width / 2 And Y < Me.Height / 2 Then
Me.Move 0, 0 '窗口移动到左上角
End If
'点击窗口的右上角时... ...
If X > Me.Width / 2 And Y > Me.Height / 2 Then
'.....
End If
End Sub