當前位置:編程學習大全網 - 編程軟體 - VB6 圖像旋轉問題!

VB6 圖像旋轉問題!

找到問題了,修改如下:

Private Sub Form_Load()

Image1.Stretch = True

Picture1.AutoRedraw = True

Picture2.AutoRedraw = True

Picture2.Visible = False

For x = 0 To Picture1.ScaleWidth Step Screen.TwipsPerPixelX

For y = 0 To Picture1.ScaleHeight Step Screen.TwipsPerPixelY

Picture2.PSet (Picture1.ScaleHeight - y, x), Picture1.Point(x, y)

Next y

Next x

Picture2.Picture = Picture2.Image

Picture2.Visible = True

End Sub

Private Sub Command1_Click()

If Len(Command1.Tag) Then

Image1.Picture = Picture2.Picture

Image1.Width = 60 * Screen.TwipsPerPixelX

Image1.Height = 50 * Screen.TwipsPerPixelY

Command1.Tag = ""

Else

Image1.Picture = Picture1.Picture

Image1.Width = 50 * Screen.TwipsPerPixelX

Image1.Height = 60 * Screen.TwipsPerPixelY

Command1.Tag = 1

End If

End Sub

  • 上一篇:C++編程題,VC++6.0,如圖
  • 下一篇:在哪裏可以看到Trow的飛控序列號?
  • copyright 2024編程學習大全網