7,757
社区成员
发帖
与我相关
我的任务
分享
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_Click(Index As Integer)
Text1(Index).Text = Val(Text1(Index).Text) + 1
End Sub
Private Sub Command2_Click()
Dim mIndex As Integer
Command2.Tag = Val(Command2.Tag) + 1
mIndex = Command2.Tag
Load Picture1(mIndex)
Picture1(mIndex).Left = Val(mIndex) * 2000
Picture1(mIndex).Visible = True
Load Text1(mIndex)
Text1(mIndex).Text = ""
SetParent Text1(mIndex).hWnd, Picture1(mIndex).hWnd
Text1(mIndex).Left = Text1(0).Left
Text1(mIndex).Visible = True
Load Command1(mIndex)
SetParent Command1(mIndex).hWnd, Picture1(mIndex).hWnd
Command1(mIndex).Left = Command1(0).Left
Command1(mIndex).Visible = True
End Sub
Private Sub Command3_Click()
If Command2.Tag > 0 Then
Unload Text1(Command2.Tag)
Unload Command1(Command2.Tag)
Unload Picture1(Command2.Tag)
Command2.Tag = Val(Command2.Tag) - 1
End If
End Sub
Private Sub Command1_Click(Index As Integer)
Text1(Index).Text = Text1(Index) + 1
End Sub
Private Sub Command2_Click()
With Picture1
Load Picture1(.Count)
Load Command1(Command1.Count)
Load Text1(Text1.Count)
Set Command1(Command1.UBound).Container = Picture1(.UBound)
Set Text1(Text1.UBound).Container = Picture1(.UBound)
Picture1(.UBound).Move Picture1(.UBound - 1).Left, _
Picture1(.UBound - 1).Top + Picture1(.UBound - 1).Height + 100
Picture1(Picture1.UBound).Visible = True
Command1(Command1.UBound).Visible = True
Text1(Text1.UBound).Visible = True
End With
End Sub
Private Sub Form_Load()
Text1(0).Text = 1
End Sub