VB编的小画板中的问题

来源:百度知道 编辑:UC知道 时间:2024/05/29 16:58:13
Private Sub files_Click(Index As Integer)
Select Case Index
Case 0
Me.Picture = LoadPicture("")
Me.Caption = "小画板-" & "未命名"
Case 1
CommonDialog1.ShowOpen
Me.Picture = LoadPicture("CommonDialog1.FileName")
Me.Caption = "小画板-" & CommonDialog1.FileName
Case 2
CommonDialog1.FileName = Mid(Me.Caption, 5)
CommonDialog1.ShowSave
SavePicture Me.Image, CommonDialog1.FileName
Case 3
End
End Select
End Sub

Private Sub Form_Load()
Me.AutoRedraw = True
Me.Caption = "小画板-" & "未命名"
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
CurrentX = X: CurrentY = Y
End If
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Me.Line (C

改两个地方。
1.第8行Me.Picture = LoadPicture("CommonDialog1.FileName")
改为Me.Picture = LoadPicture(CommonDialog1.FileName)
2.Private Sub Form_Load()
一段代码中,加一句代码
MousePointer=vbCustom
即:
Private Sub Form_Load()
MousePointer=vbCustom
Me.AutoRedraw = True
Me.Caption = "小画板-" & "未命名"
End Sub