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(ByV al e As
System.Windows. Forms.MouseEven tArgs)
Me.PegPicking = True
If Me.PegPicking = True Then
g.SmoothingMode = Drawing2D.Smoot hingMode.AntiAl ias
DrawingUtility. DrawPeg(g, New Rectangle(Me.mP osition.X
- 15, Me.mPosition.Y - 15, 30, 30), Me.PelleteColor s(0))
g.SmoothingMode = Drawing2D.Smoot hingMode.HighSp eed
End If
' Invalidate()
End Sub
Protected Overrides Sub OnMouseMove(ByV al e As
System.Windows. Forms.MouseEven tArgs)
' 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.MouseEven tArgs)
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(ByV al e As
System.Windows. Forms.MouseEven tArgs)
Me.PegPicking = True
If Me.PegPicking = True Then
g.SmoothingMode = Drawing2D.Smoot hingMode.AntiAl ias
DrawingUtility. DrawPeg(g, New Rectangle(Me.mP osition.X
- 15, Me.mPosition.Y - 15, 30, 30), Me.PelleteColor s(0))
g.SmoothingMode = Drawing2D.Smoot hingMode.HighSp eed
End If
' Invalidate()
End Sub
Protected Overrides Sub OnMouseMove(ByV al e As
System.Windows. Forms.MouseEven tArgs)
' 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.MouseEven tArgs)
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?
Comment