https://i.imgur.com/Tppceyw.png 当我单击选择时,它将打开Form2,其中列出了进程。我应该如何在Form2中选择一个进程,然后在按下选择按钮后在Form1的文本框中显示它?
这就是我获得流程的方式
Dim plist() As Process = Process.GetProcesses()
For Each prs As Process In plist
ListBox1.Items.Add(prs.ProcessName + " (" + prs.PrivateMemorySize64.ToString() + ")")
Next
答案 0 :(得分:0)
想通了 Form2:
Class<?> clazz = Class.forName("Greeter");
Object obj = clazz.getConstructor().newInstance(); // Use default constructor
Method method = clazz.getMethod("methodName",<array of class objects representing argument types>);
Object result = method.invoke(obj,<array of arguments>);