Option Strict On 'VisualBasic2008 Imports System.Drawing.Drawing2D Public Class Form1 Private hikouki As Image Private test_kakudo As Integer = 0 Private test_kakudo2 As Integer = 0 Private Sub G_A(ByVal g As Graphics, ByVal kakudo As Integer) g.RotateTransform(kakudo) g.DrawImage(hikouki, 100, 0) End Sub Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint G_A(e.Graphics, test_kakudo) End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick PictureBox1.Invalidate() test_kakudo += 1 If test_kakudo > 90 Then test_kakudo = 0 PictureBox2.Invalidate() test_kakudo2 += 1 If test_kakudo2 > 360 Then test_kakudo2 = 0 End Sub Private Sub G_B(ByVal g As Graphics, ByVal kakudo2 As Integer) Dim rotatepoint As New PointF(150.0F, 50.0F) Dim myMatrix As New Matrix myMatrix.RotateAt(test_kakudo2, rotatepoint, MatrixOrder.Append) g.Transform = myMatrix g.DrawImage(hikouki, 100, 100) End Sub Private Sub PictureBox2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox2.Paint G_B(e.Graphics, test_kakudo2) End Sub Public Sub New() ' この呼び出しは、Windows フォーム デザイナで必要です。 InitializeComponent() ' InitializeComponent() 呼び出しの後で初期化を追加します。 hikouki = My.Resources.houdai_kougeki End Sub End Class