那位大虾帮我看看是、可不可以简化点。。。
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图像里按顺序显示同一个画面,每按一次递增显示一个画面。现在效果是达到了,可不可以简单点呢?求指教。。。