1.Private Sub Form_Load() Picture1.Appearance = 1 Picture1.BorderStyle = 0 End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 ThenPicture1.BorderStyle = 1 End IfEnd SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 ThenPicture1.BorderStyle = 0 End If End Sub'----------------------------------------------------------------------------2.Private Sub Form_Load() Picture1.ScaleMode = 3 Picture1.AutoRedraw = False Picture1.BorderStyle = 0 Picture1.DrawWidth End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 Then Picture1.Line (0, Picture1.ScaleHeight - 1)-(Picture1.ScaleWidth, Picture1.ScaleHeight - 1), RGB(255, 255, 255) Picture1.Line (Picture1.ScaleWidth - 1, 0)-(Picture1.ScaleWidth - 1, Picture1.ScaleHeight), RGB(255, 255, 255) Picture1.Line (0, 1)-(Picture1.ScaleWidth - 2, 1), RGB(0, 0, 0) Picture1.Line (1, 0)-(1, Picture1.ScaleHeight - 2), RGB(0, 0, 0) End If End SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 ThenPicture1.RefreshEnd If End Sub
1.Private Sub Form_Load() Picture1.Appearance = 1 Picture1.BorderStyle = 0 End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 ThenPicture1.BorderStyle = 1 End IfEnd SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 ThenPicture1.BorderStyle = 0 End If End Sub'----------------------------------------------------------------------------2.Private Sub Form_Load() Picture1.ScaleMode = 3 Picture1.AutoRedraw = False Picture1.BorderStyle = 0 Picture1.DrawWidth=2 End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 Then Picture1.Line (0, Picture1.ScaleHeight - 1)-(Picture1.ScaleWidth, Picture1.ScaleHeight - 1), RGB(255, 255, 255) Picture1.Line (Picture1.ScaleWidth - 1, 0)-(Picture1.ScaleWidth - 1, Picture1.ScaleHeight), RGB(255, 255, 255) Picture1.Line (0, 1)-(Picture1.ScaleWidth - 2, 1), RGB(0, 0, 0) Picture1.Line (1, 0)-(1, Picture1.ScaleHeight - 2), RGB(0, 0, 0) End If End SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 ThenPicture1.RefreshEnd If End Sub
在MOUSEDOWN事件中,Picture1.Appearance = 1
在mouseup事件中,Picture1.Appearance = 0
不就行了吗
Picture1.Appearance = 1
Picture1.BorderStyle = 0
End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 ThenPicture1.BorderStyle = 1
End IfEnd SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 ThenPicture1.BorderStyle = 0
End If
End Sub'----------------------------------------------------------------------------2.Private Sub Form_Load()
Picture1.ScaleMode = 3
Picture1.AutoRedraw = False
Picture1.BorderStyle = 0
Picture1.DrawWidth
End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Line (0, Picture1.ScaleHeight - 1)-(Picture1.ScaleWidth, Picture1.ScaleHeight - 1), RGB(255, 255, 255)
Picture1.Line (Picture1.ScaleWidth - 1, 0)-(Picture1.ScaleWidth - 1, Picture1.ScaleHeight), RGB(255, 255, 255)
Picture1.Line (0, 1)-(Picture1.ScaleWidth - 2, 1), RGB(0, 0, 0)
Picture1.Line (1, 0)-(1, Picture1.ScaleHeight - 2), RGB(0, 0, 0)
End If
End SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 ThenPicture1.RefreshEnd If
End Sub
Picture1.Appearance = 1
Picture1.BorderStyle = 0
End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 ThenPicture1.BorderStyle = 1
End IfEnd SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 ThenPicture1.BorderStyle = 0
End If
End Sub'----------------------------------------------------------------------------2.Private Sub Form_Load()
Picture1.ScaleMode = 3
Picture1.AutoRedraw = False
Picture1.BorderStyle = 0
Picture1.DrawWidth=2
End SubPrivate Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Line (0, Picture1.ScaleHeight - 1)-(Picture1.ScaleWidth, Picture1.ScaleHeight - 1), RGB(255, 255, 255)
Picture1.Line (Picture1.ScaleWidth - 1, 0)-(Picture1.ScaleWidth - 1, Picture1.ScaleHeight), RGB(255, 255, 255)
Picture1.Line (0, 1)-(Picture1.ScaleWidth - 2, 1), RGB(0, 0, 0)
Picture1.Line (1, 0)-(1, Picture1.ScaleHeight - 2), RGB(0, 0, 0)
End If
End SubPrivate Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 ThenPicture1.RefreshEnd If
End Sub