| 发表于:2007-02-27 10:18:11 楼主 |
select case index mod 3 '把9个image控件分成三列 case 0 '当鼠标点击第1列时 if image1(index + 1).picture = loadpicture( " ") then '判断右边是否为空 image1(index + 1).picture = image1(index).picture '交换图片 image1(index).picture = loadpicture( " ") win '测试是否拼图成功 end if ‘到这都没问题从下面就开始出错了 case 1 '当鼠标点击第2列时 if image1(index - 1).picture = loadpicture( " ") then '判断左边是否为空 image1(index - 1).picture = image1(index).picture image1(index).picture = loadpicture( " ") win end if if image1(index + 1).picture = loadpicture( " ") then '判断右边是否为空 image1(index + 1).picture = image1(index).picture image1(index).picture = loadpicture( " ") win end if case 2 '当鼠标点击第3列时 if image1(index - 1).picture = loadpicture( " ") then '判断左边是否为空 image1(index - 1).picture = image1(index).picture image1(index).picture = loadpicture( " ") win end if end select |
|
|
|
|