S
Supra
i got board working using graphic window in vb.net but no controls
adding to form. i am doing checker board game. when i clicked and moved
the peg to another location(grid). but how do i get bitmap or image to
make invisible.
here is code for mouseevent:
Protected Overrides Sub OnMouseDown(ByVal e As
System.Windows.Forms.MouseEventArgs)
Me.PegPicking = True
If Me.PegPicking = True Then
g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
DrawingUtility.DrawPeg(g, New Rectangle(Me.mPosition.X
- 15, Me.mPosition.Y - 15, 30, 30), Me.PelleteColors(0))
g.SmoothingMode = Drawing2D.SmoothingMode.HighSpeed
End If
' Invalidate()
End Sub
Protected Overrides Sub OnMouseMove(ByVal e As
System.Windows.Forms.MouseEventArgs)
' change Position to current mouse Position
Me.mPosition = New Point(e.X, e.Y)
' Repaint to Show Effect
Invalidate()
' End If
End Sub
Protected Overrides Sub OnMouseUp(ByVal e As
System.Windows.Forms.MouseEventArgs)
Me.PegPicking = True
'Inserting Pegs but only is Game is Active
Invalidate()
End Sub
how do i make bitmap or image invisible or something like disappearing?
adding to form. i am doing checker board game. when i clicked and moved
the peg to another location(grid). but how do i get bitmap or image to
make invisible.
here is code for mouseevent:
Protected Overrides Sub OnMouseDown(ByVal e As
System.Windows.Forms.MouseEventArgs)
Me.PegPicking = True
If Me.PegPicking = True Then
g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
DrawingUtility.DrawPeg(g, New Rectangle(Me.mPosition.X
- 15, Me.mPosition.Y - 15, 30, 30), Me.PelleteColors(0))
g.SmoothingMode = Drawing2D.SmoothingMode.HighSpeed
End If
' Invalidate()
End Sub
Protected Overrides Sub OnMouseMove(ByVal e As
System.Windows.Forms.MouseEventArgs)
' change Position to current mouse Position
Me.mPosition = New Point(e.X, e.Y)
' Repaint to Show Effect
Invalidate()
' End If
End Sub
Protected Overrides Sub OnMouseUp(ByVal e As
System.Windows.Forms.MouseEventArgs)
Me.PegPicking = True
'Inserting Pegs but only is Game is Active
Invalidate()
End Sub
how do i make bitmap or image invisible or something like disappearing?