如果可以,将父窗体中的那个过程设置为Friend。
在子窗体中添加一个Friend的Form变量。最上面:Friend FatherWindow As Form
在显示窗体的的时候,对这个FatherWindow设置:xxx.FatherWindow=Me
调用父窗体过程的时候:FatherWindow.xxxxx(输入的时候系统不会提示出来,需要手工输入完全的名称。)
在父窗中(frmPare:
Public Sub ShowMessage(ByVal SM as String)
...
ComboBox1.text = SM
End Sub
在子窗中:
Private Sub frmAdmin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim frm as 父窗体类型=me.mdiparent
frm.ShowMessage(...)
End Sub