none
How to reset the rotateflip position back to the way it was ? RRS feed

  • Question

  •     Private Sub d01_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles d01.DoubleClick
            Dim w As Integer = d01.Width
            Dim h As Integer = d01.Height
            d01.BackgroundImage.RotateFlip(RotateFlipType.Rotate90FlipNone)
            d01.Width = w
            d01.Height = h
            d01.Refresh()
        End Sub
    • Edited by Zhippers Monday, August 12, 2019 10:57 AM
    Monday, August 12, 2019 10:53 AM

Answers

  • Hi,

    try my code:

        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    
            Me.Hide()
            Dim form1 As Form1 = New Form1()
            form1.ShowDialog()
            Me.Close()
    
        End Sub

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Zhippers Sunday, August 18, 2019 2:24 PM
    • Marked as answer by Zhippers Tuesday, August 20, 2019 2:39 AM
    Tuesday, August 13, 2019 6:07 AM

All replies

  • i mean like, after click button reset -> rotation and moving object back to default position,,, example like reset drawing to clear also like game domino after game finish.. card back to position (rotate, flip, position),, not like click button reset decrease rotate 90, 180, 270 (manual). The more 20 object will reset

    Public Class Domino
    
        Private Sub d01_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles d01.MouseMove
            Static mousePosX As Single, mousePosY As Single
            If e.Button = 0 Then
                mousePosX = e.X
                mousePosX = e.Y
            Else
                d01.Left = d01.Left + (e.X - mousePosX)
                d01.Top = d01.Top + (e.Y - mousePosY)
            End If
        End Sub
    
        Private Sub d01_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles d01.DoubleClick
            Dim w As Integer = d01.Width
            Dim h As Integer = d01.Height
            d56.BackgroundImage.RotateFlip(RotateFlipType.Rotate180FlipNone)
            d01.Width = w
            d01.Height = h
            d01.Refresh()
        End Sub
    
        Private Sub Reset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Reset.Click
            d01.Location = New Point(408, 656)
        End Sub
    End Class

    Screenshoot

    https://social.msdn.microsoft.com/Forums/getfile/1471189


    • Edited by Zhippers Monday, August 12, 2019 1:56 PM
    Monday, August 12, 2019 1:33 PM
  • Hi,

    try my code:

        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    
            Me.Hide()
            Dim form1 As Form1 = New Form1()
            form1.ShowDialog()
            Me.Close()
    
        End Sub

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Zhippers Sunday, August 18, 2019 2:24 PM
    • Marked as answer by Zhippers Tuesday, August 20, 2019 2:39 AM
    Tuesday, August 13, 2019 6:07 AM
  • Thanks, this works
    • Edited by Zhippers Sunday, August 18, 2019 2:26 PM
    Sunday, August 18, 2019 2:26 PM