vb激活指定窗体,我想先让一个窗体失去焦点,窗体名称不固定,然后按按钮将其激活,代码怎么写????! 5
我是由以下代码PrivateSubForm_Load()Callloadtask(Me)EndSubPrivateSubForm_Unload(CancelAsInteg...
我是由以下代码
Private Sub Form_Load()
Call loadtask(Me)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call unloadtask
End Sub
Public Sub loadtask(ByVal fN As Form)
taskint = taskint
If taskint < 1 Then
taskint = 1
frmMain.TaskButton(taskint).Caption = Me.Caption
Else
If taskint = 1 Then
frmMain.TaskButton(taskint).Caption = Me.Caption
End If
End If
End Sub
Public Sub unloadtask()
taskint = taskint
If taskint <= 0 Then
taskint = 1
Else
frmMain.TaskButton(taskint).Caption = ""
taskint = taskint - 1
End If
End Sub 展开
Private Sub Form_Load()
Call loadtask(Me)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call unloadtask
End Sub
Public Sub loadtask(ByVal fN As Form)
taskint = taskint
If taskint < 1 Then
taskint = 1
frmMain.TaskButton(taskint).Caption = Me.Caption
Else
If taskint = 1 Then
frmMain.TaskButton(taskint).Caption = Me.Caption
End If
End If
End Sub
Public Sub unloadtask()
taskint = taskint
If taskint <= 0 Then
taskint = 1
Else
frmMain.TaskButton(taskint).Caption = ""
taskint = taskint - 1
End If
End Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询