1

对于智能手机模拟,我的目的是在"screen"智能手机上运行应用程序,这是一个图片框。到目前为止,我正在使用以下代码:

Imports System.Diagnostics
Imports System.Runtime.InteropServices
Public Class Form1
   <DllImport("user32.dll")> Public Shared Function SetParent(ByVal hwndChild As IntPtr, ByVal hwndNewParent As IntPtr) As Integer
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim Process1 As New Process
        Process1.StartInfo.FileName = "Application_Name.exe"
        Process1.Start()

        Do Until Process1.WaitForInputIdle = True
            Application.DoEvents()
SetParent(Process1.MainWindowHandle, PictureBox1.Handle)

        Loop

    End Sub
End Class

但是,这实际上并没有将应用程序放在图片框上(应用程序的表单位于其他位置)。我的意图是将应用程序的表单放在图片框上,如果它超过图片框的大小,则显示滚动条。

任何想法将不胜感激。

事实上,运行新应用程序的对象甚至不必是图片框,只要应用程序可以在其中运行即可。谢谢你。

4

0 回答 0