现在代码要改改了
Dim frm As Object = windows.Forms.Form.activeform
If frm IsNot Nothing Then
output.show(frm.name)
If frm.name = "Class235" Then
frm.controls("Button1").Visible = False
frm.controls("Button2").Visible = False
frm.controls("Button3").Visible = False
frm.controls("cmbFTPPath").Visible = False
frm.controls("Label1").Visible = False
frm.controls("TextBox1").Visible = False
frm.controls("C1FlexGrid1").height = 380
Else If frm.name = "Class234" Then
frm.controls("cmbFTPPath").Visible = False
frm.controls("Label2").Visible = False
frm.controls("cmbFTPPath").Visible = False
frm.controls("btnOpen").Visible = False
frm.controls("btnOpenLocFolder").Visible = False
frm.controls("Label1").Visible = False
frm.controls("btnRefresh").Visible = False
frm.controls("btnUpload").Visible = False
frm.controls("btnDownload").Visible = False
frm.controls("btnMakeDir").Visible = False
frm.controls("btnRename").Visible = False
frm.controls("btnDelete").Visible = False
frm.controls("C1FlexGrid2").Visible = False
frm.controls("C1FlexGrid1").top = 10
frm.height = 380
End If
End If