0
mousemove 이벤트에서 캡처 할 수없는 누락 된 값을 얻을 수있는 전문가가 있습니까?MouseMove 이벤트에서 캡처 할 수없는 누락 된 값을 어떻게 채울 수 있습니까?
내 프로젝트의 비디오. [View]
내 생각이 어떤 아니라,
For Each i as even row index and j as odd row index
If i - j > 2
Do Until j = i
dgv.rows.insert()'code that will increase by +1
은 행 인덱스를 확인하려면 우리가 다시
If i Mod 2 = 0 Then
'even
Else
'Odd
End If
을 말할 수있는 우리가 같이 누락 된 값을 얻을 수 어쨌든이 실제 코드. 나는 단지 내 생각을 설명하려고 애썼다.
양식 코드 :
Public Class Form1
Dim drag As Boolean
Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseMove
If Not drag Then
Exit Sub
End If
dgv.Rows.Add((MousePosition.X - Me.Left - 8).ToString, (MousePosition.Y - Me.Top - 34).ToString)
End Sub
Private Sub PictureBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseDown
drag = True
End Sub
Private Sub PictureBox1_MouseUp(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseUp
drag = False
Dim img As Bitmap = New Bitmap(Me.Width, Me.Height)
Dim gfx As Graphics = Graphics.FromImage(img)
For i As Integer = 0 To dgv.RowCount - 1
gfx.FillEllipse(Brushes.Black, Convert.ToInt32(dgv.Rows(i).Cells(0).Value), Convert.ToInt32(dgv.Rows(i).Cells(1).Value), 5, 5)
Next
PictureBox1.Image = img
End Sub
End Class
누락 된 값은 무엇입니까? 여기에 전체 설명과 명확한 설명을 쓸 수있을 때 우리를 오프 사이트로 만들고 비디오를 보지 마십시오. – jmcilhinney
좋아요, 코드로 업데이트 중입니다. 그러나 비디오를 제공하는 것이 문제를 설명하는 좋은 방법이라고 생각했습니다. –
이제 확인할 수 있습니다. 나는 그 질문을 갱신했다. –