在picturebox上画线;
     --------------
     |    图      |
     |    像      |
     --------------
左边和上边用黑色,右边和下边用白色

解决方案 »

  1.   

    很难么?
    在MOUSEDOWN事件中,Picture1.Appearance = 1
    在mouseup事件中,Picture1.Appearance = 0
    不就行了吗
      

  2.   

    哦,如果Picture1.Appearance = 0时,背景色和窗口颜色不一致的话,你可以设置backcolor呵呵,问题解决了,不要忘了加分
      

  3.   

    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
      

  4.   

    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
      

  5.   

    用两个picturebox,平时显示其中一个,按下鼠标时显示另一个。