| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 332 人关注过本帖
标题:那位大虾帮我看看是、可不可以简化点。。。
取消只看楼主 加入收藏
shmily520m
Rank: 1
等 级:新手上路
帖 子:12
专家分:4
注 册:2012-7-31
结帖率:100%
收藏
 问题点数:0 回复次数:2 
那位大虾帮我看看是、可不可以简化点。。。


Private Sub Cmd10_Click()
Select Case Y
Case 0:
Img1.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 1:
Img2.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 2:
Img3.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 3:
Img4.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 4:
Img5.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 5:
Img6.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 6:
Img7.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 7:
Img8.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 8:
Img9.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 9:
Img10.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 10:
Img11.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 11:
Img12.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 12:
Img13.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 13:
Img14.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 14:
Img15.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
Case 15:
Img16.Picture = LoadPicture("C:\Documents and Settings\Administrator\桌面\X12\res\and.bmp")
End Select
Y = Y + 1
If Y > 15 Then
Y = 15
End If
End Sub
//效果要求,控制一个cmd按键在16个Img图像里按顺序显示同一个画面,每按一次递增显示一个画面。现在效果是达到了,可不可以简单点呢?求指教。。。
搜索更多相关主题的帖子: Documents 
2012-08-03 11:00
shmily520m
Rank: 1
等 级:新手上路
帖 子:12
专家分:4
注 册:2012-7-31
收藏
得分:0 
说Img(y)没定义。。
2012-08-03 15:45
shmily520m
Rank: 1
等 级:新手上路
帖 子:12
专家分:4
注 册:2012-7-31
收藏
得分:0 
呵呵,OK了。。谢谢2楼哈。
我还问问,我现在要把自己制作的图片Copy出来,要怎么弄啊?求详解。。。VB 6.0
2012-08-03 15:54
快速回复:那位大虾帮我看看是、可不可以简化点。。。
数据加载中...
 
   



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

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