救命啊!VB高手进!!!

lyq946856 2009-06-06 08:24:47
我是新手,最近用VB编一个图片浏览特效工程,,在编译时老是提示:VB中错误的参数号或无效的属性赋值
请高手救助,感激不尽!

代码如下:

使用的控件有:driver1,picture1,dir1,file1,frame1,option1~option4,text1,command1


Private Sub Command2_Click()

End

End Sub
------------------------------------------------------------------
Private Sub Dir1_Change()
File1.Path = Dir1.Path

End Sub

--------------------------------------------------------------------
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive

End Sub
--------------------------------------------------------------------
Private Sub File1_Click()
Dim str, fullname As String
str = Dir1.Path
If Right(str, 1) = "\" Then str = "" Else str = "\"
fullname = Dir1.Path & str & File1.FileName
Text1.Text = fullname

Image1.Visible = False
Image1.Picture = LoadPicture(fullname)

Picture1.Cls
If option1.Value = ture Then
directshow
ElseIf Option2.Value = ture Then
rollshow
ElseIf Option3.Value = ture Then
crossshow
ElseIf Option4.Value = ture Then
rainshow
End If

End Sub
---------------------------------------------------------
Private Sub Form_Load()
Text1.Text = ""
File1.Pattern = "*.bmp;*.gif;*.jpg;*.ico"
option1.Value = True



End Sub
-----------------------------------------------------------

Public Sub directshow()
Picture1.PaintPicture Image1.Picture, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, 0, 0, Image1.Width,Image1.Height, vbSrcCopy
End Sub
-------------------------------------------------------------------------------------------------------
Public Sub rollshow()
Dim i, p As Integer
Dim pp, pi
p = 40
pp = Picture1.ScaleHeight
pi = Image.Height / p
For i = 0 To p
Picture1.PaintPicture Image1.Picture, 0, pp * i, Picture1.ScaleWidth, pp, 0, , pp * i, Image1.Width, pi, vbSrcCopy
delay 500
Next

End Sub
-----------------------------------------------------------------------------------------------------
Public Sub crossshow()
Dim i, p As Integer
Dim pp, pi
p = 80
pp = Picture1.ScaleWidth / p

pi = Image.Height / p

For i = 0 To p Step 2

Picture1.PaintPicture Image1.Picture, pp * i, 0, pp, Picture1.ScaleHeight, pp * i, 0, pi, Image1.Height, vbSrcCopy

delay 500
Next

End Sub
-------------------------------------------------------------------------------------


Public Sub rainshow()
Dim i, p, j As Integer
Dim pp, pi
p = 40
pp = Picture1.ScaleHeight / p

pi = Image.Height / p
For i = 0 To p - 1
For j = p - 1 To i Step -1

Picture1.PaintPicture Image1.Picture, 0, pp * j, Picture1.ScaleWidth, pp, 0, , pp * i, Image1.Width, pi, vbSrcCopy
Next

delay 500
Next
End Sub
--------------------------------------------------------------------------------------------------------
Public Sub delay(ByVal t As Integer)
Do While t > 0
t = t - 1
DoEvents
Loop


End Sub

请你给编译一下,指点迷津!谢谢!
...全文
12 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
lyq946856 2009-06-06
Public Sub rollshow()
Dim i, p As Integer
Dim pp, pi
p = 40
pp = Picture1.ScaleHeight
pi = Image.Height / p
For i = 0 To p
Picture1.PaintPicture Image1.Picture, 0, pp * i, Picture1.ScaleWidth, pp, 0, , pp * i, Image1.Width, pi, vbSrcCopy
delay 500
Next

End SUB
中的Picture1.PaintPicture
回复
slowgrace 2009-06-06
在哪一行报的错?
回复
相关推荐
发帖
网络编程
创建于2007-09-28

1480

社区成员

VB 网络编程
申请成为版主
帖子事件
创建了帖子
2009-06-06 08:24
社区公告
暂无公告