vb:实时错误424要求对象

vb:实时错误424要求对象
Private Declare Function bitblt Lib "gdi32" (ByVal hdestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nwidth As Long, ByVal nheight As Long, ByVal hsrcdc As Long, ByVal xsrc As Long, ByVal ysrc As Long, ByVal dwrop As Long) As Long
Const srcopy = &HCC0020
Dim h As Integer
Dim w As Integer

Private Sub form_load()

picture2.Picture = LoadPicture(App.Path & "\jj.bmp")

h = Picture1.Height
w = Picture.Width

End Sub
Private Sub Command1_Click()
picture2.Picture = LoadPicture("")
For j = 0 To h Step 1
For i = 0 To w Step 1
bitblt picture2.hDC, i, j, 1, 1, Picture1.hDC, w - i, h - j, srcopy
Next i
Next j
End Sub
Private Sub Command2_Click()
picture2.Picture = LoadPicture("")
For i = h To 0 Step -1
For j = 0 To w Step 1
bitblt picture2.hDC, i, j, 1, 1, Picture1.hDC, w - j, h - i, srcopy
Next j
nexti
End Sub
Private Sub Command3_Click()
picture2.Picture = LoadPicture("")
For j = w To 0 Step -1
For i = 0 To h Step 1
bitblt picture2.hDC, i, j, 1, 1, Picture1.hDC, j, i, srcopy
Next i
Next j

End Sub

Private Sub Command4_Click()
picture2.Picture = LoadPicture("")
For i = w To 0 Step -1
For j = 0 To h Step 1
bitblt picture2.hDC, i, j, 1, 1, Picture1.hDC, i, j, srcopy
Next j
Next i
End Sub
Private Sub Command5_Click()
picture2.Picture = LoadPicture("")
For j = 0 To h Step 1
For i = 0 To w Step 1
bitblt picture2.hDC, i, j, 1, 1, Picture1.hDC, w - i, h - j, srcopy
Next i
Next j
End Sub
Private Sub Command6_Click()
picture2.Picture = LoadPicture("")
For i = 0 To w Step 1
For j = 0 To h Step 1
bitblt picture2.hDC, i, j, 1, 1, Picture1.hDC, i, j, srcopy
Next j
Next i
End Sub

Private Sub Command7_Click()
End
End Sub
这是我照书写的代码,之后就显示实时错误424,黄色的是:picture2.Picture = LoadPicture(App.Path & "\jj.bmp")
我已经把jj的图片放到和我的VB一个文件夹里了啊!高手指点,急!
picture2 控件是否添加到窗体上去了?
要添加引用啊
是不是没有添加什么引用呢?
← 上一篇: 下一篇: →