如果换做 vb2010 的vb6.0 该怎么修改呢?
时间:2011-10-01
来源:互联网
Private Sub Command1_Click(Index As Integer)
For i = 1 To Image3.Count
If Image3.Count > 1 Then
Unload Image3(i)
Unload Label3(i)
End If
Next i
For i = 1 To Index
Command1(i).Top = Command1(0).Top + Command1(0).Height * (i)
Next i
For i = Index + 1 To Command1.Count - 1
Frame1.Top = Command1(Index).Top + Command1(0).Height
Command1(i).Top = Frame1.Top + Frame1.Height + Command1(0).Height * (i - Index)
Next i
For i = 1 To Command1(Index).Tag
Load Image3(i)
Load Label3(i)
Image3(i).Picture = LoadPicture(App.Path & "\" & Index & i & ".bmp")
Image3(i).Top = 900 * i - 500
Image3(i).Left = 800
Label3(i).Top = Image3(i).Top + 650
Label3(i).Left = Image3(i).Left - 100
Image3(i).Visible = True
Label3(i).Visible = True
Next i
Select Case Index
Case 0
Label3(1).Caption = "文学类图书"
Label3(2).Caption = "计算机类图书"
Case 1
Label3(1).Caption = "第一位遗漏"
Label3(2).Caption = "第二位遗漏"
Label3(3).Caption = "第三位遗漏"
Case 2
Label3(1).Caption = "同学录"
Label3(2).Caption = "校友录"
Case 3
Label3(1).Caption = "省内企业"
Label3(2).Caption = "省外企业"
Case 4
Label3(1).Caption = "员工通讯录"
Label3(2).Caption = "员工档案"
Label3(3).Caption = "员工业绩管理"
End Select
End Sub
Private Sub Label1_Click(Index As Integer)
Dim mx As String
Select Case Index
Case 0
mx = &HFFC0C0
Case 1
mx = &HFF00&
Case 2
mx = &HFF&
Case 3
mx = &HFFFF&
End Select
For i = 0 To Command1.Count - 1
Command1(i).BackColor = mx
Next i
End Sub
Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Visible = False
Image2.Visible = False
Image4.Visible = False
Image5.Visible = False
If Index = 0 Then
Image1.Visible = True
End If
If Index = 1 Then
Image2.Visible = True
End If
If Index = 2 Then
Image4.Visible = True
For i = 1 To Image3.Count
If Image3.Count > 1 Then
Unload Image3(i)
Unload Label3(i)
End If
Next i
For i = 1 To Index
Command1(i).Top = Command1(0).Top + Command1(0).Height * (i)
Next i
For i = Index + 1 To Command1.Count - 1
Frame1.Top = Command1(Index).Top + Command1(0).Height
Command1(i).Top = Frame1.Top + Frame1.Height + Command1(0).Height * (i - Index)
Next i
For i = 1 To Command1(Index).Tag
Load Image3(i)
Load Label3(i)
Image3(i).Picture = LoadPicture(App.Path & "\" & Index & i & ".bmp")
Image3(i).Top = 900 * i - 500
Image3(i).Left = 800
Label3(i).Top = Image3(i).Top + 650
Label3(i).Left = Image3(i).Left - 100
Image3(i).Visible = True
Label3(i).Visible = True
Next i
Select Case Index
Case 0
Label3(1).Caption = "文学类图书"
Label3(2).Caption = "计算机类图书"
Case 1
Label3(1).Caption = "第一位遗漏"
Label3(2).Caption = "第二位遗漏"
Label3(3).Caption = "第三位遗漏"
Case 2
Label3(1).Caption = "同学录"
Label3(2).Caption = "校友录"
Case 3
Label3(1).Caption = "省内企业"
Label3(2).Caption = "省外企业"
Case 4
Label3(1).Caption = "员工通讯录"
Label3(2).Caption = "员工档案"
Label3(3).Caption = "员工业绩管理"
End Select
End Sub
Private Sub Label1_Click(Index As Integer)
Dim mx As String
Select Case Index
Case 0
mx = &HFFC0C0
Case 1
mx = &HFF00&
Case 2
mx = &HFF&
Case 3
mx = &HFFFF&
End Select
For i = 0 To Command1.Count - 1
Command1(i).BackColor = mx
Next i
End Sub
Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Visible = False
Image2.Visible = False
Image4.Visible = False
Image5.Visible = False
If Index = 0 Then
Image1.Visible = True
End If
If Index = 1 Then
Image2.Visible = True
End If
If Index = 2 Then
Image4.Visible = True
作者: zhq1001 发布时间: 2011-10-01
vb.net里控件数组不是这么写的
作者: ningweidong 发布时间: 2011-10-03
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28