救命啊!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

请你给编译一下,指点迷津!谢谢!
...全文
39 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
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
  • 打赏
  • 举报
回复
在哪一行报的错?

1,502

社区成员

发帖
与我相关
我的任务
社区描述
VB 网络编程
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧