| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 390 人关注过本帖
标题:[求助]QB 转换VB问题
取消只看楼主 加入收藏
jimboy
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2005-8-30
收藏
 问题点数:0 回复次数:0 
[求助]QB 转换VB问题

下面的是QB的,要改变成VB的,我实在是弄不出来,程序如下:
'第一振型
Private Sub showpic1(fuai!(), detime!, xle!, yle!)

xlen% = 160: ylen% = 240
lx1! = 40: ly1! = 30
'------------- 1. first w1 ---------------
' VIEW (lx1! - 2, ly1! - 2)-(lx1! + xlen% + 2, ly1! + ylen% + 2), 0, 7
' VIEW (lx1! - 1, ly1! - 1)-(lx1! + xlen% + 1, ly1! + ylen% + 1), 0, 15
' VIEW (lx1!, ly1!)-(lx1! + xlen%, ly1! + ylen%), 0, 15
' WINDOW (0, 0)-(xle!, yle!)

'------------------------------------------
Dim wei%(1 To 3, 1 To 3)
wei%(1, 1) = -4: wei%(1, 2) = -3: wei%(1, 3) = -2
wei%(2, 1) = -1: wei%(2, 2) = 0: wei%(2, 3) = 1
wei%(3, 1) = 2: wei%(3, 2) = 3: wei%(3, 3) = 4

'------------------------------------------
lx! = 50!: ly! = 80!: xlen! = 60: ylen! = 40
rix! = 110!: riy! = 80!
'--------------------------------------------
lgpx! = 5
rgpx! = xle! - 5
lgpy! = 5
rgpy! = yle! - 5
'--------------------------------------------

'***************************************************

Size% = 4500
t% = 3
F% = Size% * t%
Dim obj1&(1 To Size% * t% + 10)
Dim obj2&(1 To Size% * t% + 10)
Dim obj3&(1 To Size% * t% + 10)

'----------------------------------

'---------------- save picture -------------

For k% = 1 To 3
For j% = 1 To t%
'------------------
'a$ = "第一振型"
'drawhz16 45, 30, 1, 14, 1, a$
drawzizuo lx!, ly!, 1, 2
drawzizuo rix!, riy!, 1, 2
times! = 2 * wei%(k%, j%)

For i% = 1 To 3
p1x! = lx! + times! * fuai!(i% - 1)
p2x! = lx! + times! * fuai!(i%):
p1y! = ly! + ylen! * (i% - 1)
p2y! = ly! + ylen! * (i%)
r1x! = 0!: r2x! = 0!
r1y! = 60!: r2y! = 50!
colour% = 6
line2p p1x!, p2x!, r1x!, r2x!, p1y!, p2y!, r1y!, r2y!, colour%
'------------------------------------------
Line (p2x!, p2y! + 1)-(p2x! + xlen!, p2y! + 1)
Line (p2x!, p2y!)-(p2x! + xlen!, p2y!)
Line (p2x!, p2y! - 1)-(p2x! + xlen!, p2y! - 1)
'------------------------------------------
p1x! = rix! + times! * fuai!(i% - 1)
p2x! = rix! + times! * fuai!(i%):
p1y! = riy! + ylen! * (i% - 1)
p2y! = riy! + ylen! * (i%)
r1x! = 0!: r2x! = 0!
r1y! = 60!: r2y! = 50!
colour% = 6
line2p p1x!, p2x!, r1x!, r2x!, p1y!, p2y!, r1y!, r2y!, colour%
'------------------------------------
Next i%
'------------------------------------
after (detime!) '--min 0.0001
posi% = Size% * (j% - 1) + 1 '---position of picture
If k% = 1 Then
'GET (lgpx!, lgpy!)-(rgpx!, rgpy!), obj1&(posi%)
Get lgpx, reco, F
End If
If k% = 2 Then
GET (lgpx!, lgpy!)-(rgpx!, rgpy!), obj2&(posi%)
End If
If k% = 3 Then
GET (lgpx!, lgpy!)-(rgpx!, rgpy!), obj3&(posi%)
End If
Cls 1
Next j%
Next k% '---------------------------------

'***************************************************************

'------------------- show picture --------------
'music
'detime! = .0002
Do '---------------------------------
'---------------------------------
For i% = 1 To t% '--- t% times!
posi% = Size% * (i% - 1) + 1 '---position of picture
PUT (lgpx!, lgpy!), obj1&(posi%), PSET
after (detime!) '---min 0.0001
Next i%
'---------------------------
For i% = 1 To t% '--- t% times!
posi% = Size% * (i% - 1) + 1 '---position of picture
PUT (lgpx!, lgpy!), obj2&(posi%), PSET
after (detime!) '---min 0.0001
Next i%
'---------------------------
For i% = 1 To t% '--- t% times!
posi% = Size% * (i% - 1) + 1 '---position of picture
PUT (lgpx!, lgpy!), obj3&(posi%), PSET
after (detime!) '---min 0.0001
Next i%
'---------------------------
For i% = t% - 1 To 1 Step -1 '--- t% times!
posi% = Size% * (i% - 1) + 1 '---position of picture
PUT (lgpx!, lgpy!), obj3&(posi%), PSET
after (detime!) '---min 0.0001
Next i%
'---------------------------
For i% = t% To 1 Step -1 '--- t% times!
posi% = Size% * (i% - 1) + 1 '---position of picture
PUT (lgpx!, lgpy!), obj2&(posi%), PSET
after (detime!) '---min 0.0001
Next i%
'---------------------------
For i% = t% To 2 Step -1 '--- t% times!
posi% = Size% * (i% - 1) + 1 '---position of picture
PUT (lgpx!, lgpy!), obj1&(posi%), PSET
after (detime!) '---min 0.0001
Next i%
'---------------------------
Loop Until INKEY$ <> ""

PUT (lgpx!, lgpy!), obj2&(posi%), PSET

'---------------------------------------------------------
End Sub

搜索更多相关主题的帖子: color 
2006-05-14 12:24
快速回复:[求助]QB 转换VB问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.084977 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved