+ -
当前位置:首页 → 问答吧 → 如果换做 vb2010 的vb6.0 该怎么修改呢?

如果换做 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

作者: zhq1001   发布时间: 2011-10-01

vb.net里控件数组不是这么写的

作者: ningweidong   发布时间: 2011-10-03

热门下载

更多